[SOLVED] Can I use
 tag in any context I want linebreaks display?


This Content is from Stack Overflow. Question asked by ネイサン

I’m looking up HTML text format on MDN and I came across with the example below:

    Chris Mills<br />
    Manchester<br />
    The Grim North<br />

    <li>Tel: 01234 567 890</li>
    <li>Email: me@grim-north.co.uk</li>

So, Instead of using the </br> tag to separate the <p> content, can I use the <pre> tag? Further than that, can I use it in any context I want some linebreaks?


The <pre> tag cannot be used.

This is because <pre> defines if it is shown exactly like what is written in your source code, in monospace, and that it is pre-formatted text. Just like the comment above, you can use CSS white space.

This Question was asked in StackOverflow by ネイサン and Answered by softcode It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?