如何获得制表符? [英] How to get a tab character?

查看:110
本文介绍了如何获得制表符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在HTML中,标签没有字符,但我很困惑,为什么我可以在这里复制和粘贴一个:。 (你看不到它的全部宽度,但如果你点击编辑我的问题,你会看到这个字符。)如果我可以复制和粘贴一个制表符,应该有一个相同的unicode,可以编码成html 。我知道它不存在,但这是一个我从未能够掌握的谜题。

In HTML, there is no character for a tab, but I am confused as to why I can copy and paste one here: . (You can't see the full width of it, but if you click to edit my question, you will see the character.) If I can copy and paste a tab character, there should be a unicode equivalent that can be coded into html. I know it doesn't exist, but this is a mystery I've never been able to grasp.

所以我的问题是:为什么没有一个unicode字符一个标签,即使我可以复制和粘贴它吗?

So my question is: why is there not a unicode character for a tab even if I can copy and paste it?

推荐答案

确保有一个标签实体:

	

(该选项卡是ASCII字符9,或Unicode U + 0009。)

(The tab is ASCII character 9, or Unicode U+0009.)

然而,就像文字标签(你输入到文本编辑器的标签)一样,所有标签字符被HTML解析器视为空白,并折叠为一个空格,除 < pre> 块,其中文字标签将呈现为 8个空格以等宽字体显示。

However, just like literal tabs (ones you type in to your text editor), all tab characters are treated as whitespace by HTML parsers and collapsed into a single space except those within a <pre> block, where literal tabs will be rendered as 8 spaces in a monospace font.

这篇关于如何获得制表符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆