What is an HTML Tag?
An HTML tag is the code used to define the structure and content of a web page. Tags are usually enclosed in angle brackets:
Example: <p>This is a paragraph.</p>
Types of HTML Tags
1. Paired Tags (with opening and closing)
These have both a start and end tag.
<p>This is a paragraph.</p>
<div>Container</div>
2. Self-Closing Tags (no closing tag)
These do not have closing tags and end with /> in XHTML or just a single tag in HTML5.
<img src=”image.jpg” alt=”Sample Image”>
<br>
<hr>