Lessons
Courses

Paired and Unpaired Tag [ English ]

Paired Tags

Paired tags are HTML tags that appear in pairs, consisting of:

  1. An opening tag
  2. A closing tag

The opening tag marks the start of an element, while the closing tag marks the end of the same element.The content of the element is written between these two tags, which is why paired tags are also known as container tags.

Examples

<p>This is a paragraph</p><h1>Heading</h1><div>Content block</div>

Unpaired Tags

Unpaired tags are HTML tags that consist of only a single tag and do not have a closing tag.They do not enclose any content; instead, they are used to insert standalone elements into the web page.

Because these tags do not contain content, they are also referred to as empty or void tags.

Examples

<br><hr><img src="image.jpg" alt="Image"><input type="text">