Tags
Element syntax
The closing tag has /
after <
, e.g. </
<tagname>Content goes here...</tagname>
Never skip the closing tag
You can write html by omitting the closing tag but this may be interpreted wrongly in some browsers
Wrong
<p>Content goes here...
<div>Content goes here...
<section>Content goes here...
Correct
<p>Content goes here...</p>
<div>Content goes here...</div>
<section>Content goes here...</section>
Empty elements
Except that some elements don't have a closing tag
<br>
<hr>
<img src="meme.gif">
<input id="username">