0 like 0 dislike
18 views
asked in Programming by (5.3k 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

Try to answer the question as detailed as possible.
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 (5.3k 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 14 views
0 like 0 dislike
1 answer 13 views
0 like 0 dislike
1 answer 15 views
0 like 0 dislike
1 answer 18 views
0 like 0 dislike
1 answer 25 views
0 like 0 dislike
1 answer 14 views
0 like 0 dislike
1 answer 42 views
0 like 0 dislike
1 answer 13 views
...