HTML elements

HTML elements are always enclosed in opening and closing tags.

Example:

For heading:

[html]
<h2>Heading</h2>
[/html]

It is imperative to use the closing tag.However ,there are some HTML elements that don’t need a closing tag such as <img…/>, <hr /> and <br />.These are known as void elements.

Nested HTML elements

[html]
<h2>Heading</h2>
paragraph<i>italic</i>

[/html]

Related Article

Leave a Comment