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.
| Part | Example |
|---|---|
| Opening tag | <p> |
| Content | Hello |
| 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 |
|---|
| List of common HTML Tags |
| HTML Elements and Tags |
| HTML Attributes |
| HTML Block and Inline Elements |
| HTML Div and Span |
| HTML Class and ID |
| Exercises & Assignments |
|---|
| No Content Found. |