I notice that most people use the words HTML tags and HTML elements interchangeably.
But what is the difference between them?
The way I see it is that tags are in the source code and elements are processed tags (by the browser) in the DOM. Am I wrong?
HTML tag is just opening or closing entity. For example:
<p>
and </p>
are called HTML tags
HTML element encompasses opening tag, closing tag, content (optional for content-less tags) Eg:
<p>This is the content</p>
: This complete thing is called a HTML element
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With