1

I have to write documentation for a program in classis HTML (no CSS/XML etc.). The problem appears when I have to enter multiple spaces/tabs in the document.

Since there is no "tab" in HTML, so I am using 4 non-breakable spaces as a tab character. However, when I need 2 tabs, it becomes too repetitive to enter   8 times.

Is there any possibility to create/define a custom shorthand/shortcut notation for this, e.g. instead of entering   8 times, I can use &_8nbsp; to create 8 inline spaces ?

Mubeen Shahid
  • 316
  • 6
  • 18

3 Answers3

3

Here are some types of ways to add spaces:
Use   to add a single space
Use   to add 2 spaces
Use   to add 4 spaces
Use   4 times to insert a tab

I hope this one is helpful!

1

To respect whitespace in HTML, you can use PRE element or equivalent CSS (white-space: pre).

Marat Tanalin
  • 13,927
  • 1
  • 36
  • 52
0

There is no shortcut in HTML to create multiple whitespaces. You should probably put the information in different tags and style them with CSS according to your specification.

Severin
  • 8,508
  • 14
  • 68
  • 117