Is it possible to insert a tab character in HTML instead of having to type
four times?
In CSS property padding and margin can be used to tab space instead of non-breaking spaces (nbsp).
It is equivalent to the tab character as such. Thus, from the HTML viewpoint, there is no need to “escape” it using the character reference; but you may do so e.g. if your editing program does not let you enter the character conveniently.
Adding Tab Space in HTML Unlike with HTML space, there is no particular HTML tab character you could use. You could technically use the 	 entity as the tab is character 9 in the ASCII. Unfortunately, HTML parsers will simply collapse it into a single space due to the whitespace collapse principle.
It depends on which character set you want to use.
There's no tab entity defined in ISO-8859-1 HTML - but there are a couple of whitespace characters other than
such as  
,  
,and  
.
In ASCII, 	
is a tab.
Here is a complete listing of HTML entities and a useful discussion of whitespace on Wikipedia.
It's much cleaner to use CSS. Try padding-left:5em
or margin-left:5em
as appropriate instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With