Anchor is an element and not a tag?

Tell us what’s happening:
I’m new to html, any reason why anchor is called an element instead of a tag?
i thought, in <h1>Hello world</h1> 's case
the tag are h1 and /h1
and Hello world is the element

so why is <a></a> is called an element

am i misunderstanding something?

Challenge: Link to External Pages with Anchor Elements

Link to the challenge:

Tags vs. Elements

Long story short, they are pretty much interchangeable unless you are some sort of HTML pedant.

1 Like

No, the text inside opening/closing tags is never considered the element. Text like the “Hello world” in your example is usually referred to as “innerText” which is completely different from HTML elements and tags.

1 Like

<a href="#">something here</a>
The entire thing including the tags, attributes, text inside etc is considered an element whereas the tags only refer to the <a> and </a>

1 Like

Ok thanks for the replies