How to get a tab character?

后端 未结 7 1663
有刺的猬
有刺的猬 2020-11-29 22:49

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 q

7条回答
  •  萌比男神i
    2020-11-29 23:10

    Sure there's an entity for tabs:

    	
    

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

    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

     block, where literal tabs will be rendered as 8 spaces in a monospace font.

提交回复
热议问题