What is the difference between HTML tags and elements?
P粉447002127
P粉447002127 2024-02-21 10:30:53
0
2
454

I've noticed that most people use the words "HTML tag" and "HTML element" interchangeably.

But what is the difference between them?

I think the tag is in the source code and the element is the tag in the DOM that is processed (by the browser). am I wrong?

P粉447002127
P粉447002127

reply all(2)
P粉413307845

HTML tags simply open or close entities. For example:

<p> and </p> are called HTML tags

HTML elements include start tags, end tags, and content (no content tag is optional) For example:

<p>This is the content</p>: This complete thing is called an HTML element

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!