HTML element
One building block of a web page, such as a paragraph, a button or a section, made of a start tag, its content and an end tag.
In more detail
In the DOM, each element becomes an Element node with properties such as tagName, attributes and children, and methods such as querySelector and closest. Elements are one kind of node; text and comments are nodes too but not elements.
Related terms
- HTML tag — The text in angle brackets, such as <p> or </p>, that marks where an HTML element starts and ends.
- DOM node — One object in the DOM tree, such as an element, a run of text or a comment.
- HTML attribute — A name and value written inside a start tag, such as class="card" or hidden, that configures an element.
Taught in
- HTML Parsing, Tokenization And The Document Object Model (DOM) — Frontend Architecture & Web Platform
- Semantic HTML Elements: Landmarks And Structure — Frontend Architecture & Web Platform
- Modern DOM Querying: querySelector, closest And matches — Frontend Architecture & Web Platform