Tab Space in HTML (Tutorial) - HTML Tab
There is no HTML tag that will insert a tab space in your code. Moreover, your WYSIWYG editor is likely to replace the tab space you used in your design with a series of non-breaking spaces ( ). While there are more than a few hacks you can use to align blocks of text properly, the most common one is to wrap your text in <pre> tags.
HTML Example:
This line has a tab in front and it will appear as such on your pageThe words below are also aligned with tabs apples peaches bananas oranges kiwis lemons
Result:
This line has a tab in front and it will appear as such on your page
The words below are also aligned with tabs apples peaches bananas oranges kiwis lemons
It goes without saying that for the second example you should be using HTML tables rather than relying on tabs, but you might use this solution if you need a quick fix.
Share Tweet