Using One-Tag Elements
Now that you know that most elements are two-tag elements consisting of opening-closing pairs of tags, it’s worth noting that there are a handful of useful single-tag instances known as empty elements.
General formula for an Empty HTML element:
<tagname />
An “empty element” only has one tag. Before the closing bracket of an empty element, there will often be a space and a forward-slash ( / ) character. It is an excellent habit to get into writing these tags in this way.
<p>This is a paragraph. If I want additional spacing between this and the next paragraph, I can add a LINE BREAK.</p>
<br />
<p>This is another paragraph, further down the page.</p>
html
- Previous
- Next