These elements are the building blocks of any HTML web page, and these are called tags. HTML provide different type of tags to create a html page.
Tag syntax
<tagname>text</tagname>
tag example
<html></html>
<img />
HTML provide two different type of tags.
- Paired tag
- Unpaired tag
1) Paired tag: These tags have start tag and an end tag and content is put in between start tag and end tag.
For example:
<div>Hello Programmer</div>
<p> Hello world</p>
2) Unpaired tag: These tags only have start tag and do not have an end tag and no content as well.
For example:
<img src=”image path” />
Nested Tags
Tags can also be nested, hence called nested tags.
For example:
<div><p> Hello </p> </div>