HTML Elements

HTML documents are defined by HTML elements. An HTML element is everything between the start tag and the end tag. As shown follows in the following image :

Nested Elements

Most HTML elements can be nested (contain or be contained within other HTML elements). HTML documents consist of nested HTML elements. Consider the following example, in this example <html> is the first tag, after that in between closing html tag (</html>) <body> tag isis mentioned and in between that another <p> tag is mentioned. So HTML page is full of nested elements. Example :

  <title>HTML Elements Nesting</title>
   <p> nested paragraph tag</p>

Empty Tags

the html tag which doesn’t contain any attribute are called empty tags. like : <a></a> is an empty anchor (link) tag.

Tags Convention

It’s a general convention to use html tags in lowercase, however tags with uppercase also supported but not a good markup convention


You may also like...