What is the difference between a tag and an element?


Hi guys my name is human dictionary:) and I need help figuring out the difference between an HTML tag and an HTML element.


<tag> and </tag>

(A tag is just the opening/closing , and an element is the tags, as well as the content.)

If you’re a human dictionary, shouldn’t you know that? :smiley:


Yeah okay I get that, but isn’t a tag technically an element since it is between two angle brackets?


A tag is a <tag>. Being between <> doesn’t make it an element, it makes it a tag. An element contains content as well as the enclosing tags;

<tag> <-- that's a tag

<tag> <-- all of
content <-- this is
</tag> <-- an element


Thank You :slight_smile: jibblyj