Self-closing Elements
Some HTML elements do not have a separate closing tag because they cannot contain other content.
Void elements
These are called void elements. Write the tag on its own; in HTML, adding a slash before the final angle bracket is optional and usually unnecessary.
<img src="photo.jpg" alt="A mountain view">
<br>
<hr>
<input type="text" name="first-name">
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
Other common void elements are area, base, col, embed, source, track, and wbr.
Elements such as p, div, and section are not void elements. They need closing tags, even when they have no visible text.