HTML Elements
An HTML element is everything from the start tag to the end tag.
An HTML element is defined by a start tag, some content, and an end tag:
<tagname> Content goes here... </tagname>
The HTML element is everything from the start tag to the end tag:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
Nested HTML Elements
HTML elements can be nested (elements can contain elements). All HTML documents consist of nested HTML elements.
Never Skip the End Tag
Some HTML elements will display correctly even if you forget the end tag. However, never rely on this! It can produce unexpected results or errors in complex documents.
Empty HTML Elements
HTML elements with no content are called empty elements. The <br> tag defines a line break, and is an empty element without a closing tag.
Note: HTML tags are not case-sensitive:
<P>means the same as<p>. However, the standard recommends lowercase tags.