I wanted to display the text "Hi, do you want to be friends?", so I created an HTML file and wrote something like this
<p> tag to wrap the text. <p>stands for paragraph, but when I hit enter to wrap in the editor (left), the wrap doesn't take effect in the preview page (right).
<p>is a paragraph, so we can apply this to the <p></p> tag twice to create a line break effect. But since it's a paragraph, you can see that it's spaced out.
We use the <br> tag to make wrapping as simple as possible, as shown below.
<br>is short for break, and the opening and closing tags don't exist, so the <br>is all you need to write. Sometimes <br/>or <br />and it's safe to say that there's little grammatical difference.
- HTML5 : <br>to use the <br/> or <br />Overmixing
- XHTML : <br />and some <br> or <br/>is also available
Whenever possible, use the <br> It is recommended to use a uniform notation. In addition to this, the <pre> tags to express line breaks, spacing, and more, which we'll cover in more detail another time.