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
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.
<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>