HTML Tags
What they are:
- Special keywords enclosed in angle brackets (< >) that tell the browser how to interpret content.
How they work:
- Usually come in pairs:
- Opening tag <p>
- Closing tag </p>
- Closing tags always start with a forward slash /.
Purpose:
- Mark the start and end points of an element.
HTML Elements
What they are:
- A complete structure that includes the opening tag, the content inside it, and the closing tag.
How they work:
- Start tag + Content + End tag = Element
Purpose:
- Elements are the actual building blocks of a webpage.
Example:
<p>This is a paragraph.</p>
- <p> → opening tag
- This is a paragraph. → content
- </p> → closing tag
- Together, they form a paragraph element.
Reference:
https://www.tutorialspoint.com/html/html_elements.html
https://www.w3schools.com/html/html_elements.asp
Top comments (0)