0 like 0 dislike
2 views
asked in Programming by (4.5k points)
edited by

How I can to add a tabulation space in HTML markup? What is in HTML an equivalent to the consoles special char \t?

tabulation spacing in html
html tabulation

Your answer

pre, code

Preview

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

0 like 0 dislike
answered by (4.5k points)
edited by

Unicode

Inside the <pre> tags you can use &#9; which is the unicode symbol of tabulation. But outside preformated section browser will show it as a one long space.

Mnemonics

Also you can use next characters:

  • &emsp; - wide space
  • &nbsp;&nbsp; - double non-breaking space

CSS

Also You can use next CSS properties:

  • margin-left: 2em;
  • text-indent: 20px;
  • white-space: pre;

Related questions

0 like 0 dislike
1 answer 11 views
0 like 0 dislike
1 answer 1 view
0 like 0 dislike
1 answer 9 views
0 like 0 dislike
1 answer 9 views
0 like 0 dislike
1 answer 18 views
0 like 0 dislike
1 answer 23 views
0 like 0 dislike
1 answer 6 views
...