HTML Elements

HTML elements are nothing but HTML tags, for example, The title tag, it represents the title of the document.

Most html elements are written with a start tag(Or opening tag) and an end tag(or closing tag).

Html elements with no content are called empty elements. Empty elements do not have an end tag, such as the <br>,<hr> elements

Element or Tag can also contain attribute that define additional properties of an elements.

for example, a paragraph tag which can have the attribute class.

ex. <p class="foo">This is paragraph.</p>

Are HTML tags Or Elements are case sensitive?

No, HTML tags or its attributes are not case sensitive. It means the tag <p>, and the tag <P> define the same thing in HTML which shows the paragraph.

Note: We recommend using lowercase for tag and attribute name in HTML.

Empty Elements:

In HTML few tags or elements are not have closing tag such elements are called empty elements or tags.

For ex.

<br> tag this represents the line break.

Nested HTML Elements

HTML elements can be nested(elements inside elements)

All HTML documents consist of nested HTML elements.

Example
<!DOCTYPE html>
<html>
<body>

<h1>This is First Heading</h1>
<p>This is first paragraph.</p>

</body>
</html>

<html> defines the whole document that contain <body> tag.

<body> element define the document body.

Inside <body> <h1> and <p> tags are the nested tags.

<h1> define the heading.

<p> define the paragraph.