How to create spaces between text in HTML

When trying to add extra spaces in an HTML document you will probably have noticed this can’t be realized by simply adding a large number of spaces. Adding various spaces needs to be realized in a different way because HTML ignores two or more spaces. Creating large spaces in between text content can be easily realized by means of & nbsp ;. You can use & nbsp ; as many times as required. For example:

HTML:

<p>Lorem ipsum &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dolor sit amet</p>



Output:

<p>Lorem ipsum       dolor sit amet</p>


Was this useful?