in Programming by (10.3k points) edited by
0 like 0 dislike
59 views

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

1 Answer

0 like 0 dislike
by (10.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;

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.