wavey wavey - 1 year ago 63
HTML Question

Text won't stay in the same format as written in HTML document

My HTML document has a bunch of text written down in a list like so;

example

test

this

way

Yet when the page is loaded its all one jumbled line. How do I format it so it's the way it's written above but without the spacing? Using



<p>





only creates more spacing.

Answer Source

You can use like breaks:

Text<br>More text<br>Even more text

These act as carriage returns and have them on separate lines. Here's an example on JSFiddle. Read more at the article on Mozilla MDN

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download