What is the difference between HTML tags and elements?

A tag is only the label written in angle brackets, like <p> and </p>. An element is the complete thing: the opening tag, the content and the closing tag together.

PartExample
Opening tag<p>
ContentHello
Closing tag</p>
Element<p>Hello</p>

Empty elements like <br> have only one tag. In daily talk people use both words for the same thing. See HTML Elements and Tags.


Learn more about the similar topics:
Tutorials
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.