An element is a part of a webpage. In XML and HTML, an element may contain a data item or a chunk of text or an image, or perhaps {{glossary("empty element","nothing",1)}}. A typical element includes an opening {{glossary("tag")}}, {{glossary("attribute","attributes")}}, content, and a closing tag:
Element and tag are not interchangeable: tags begin or end an element in the source, whereas elements are part of the {{Glossary("DOM")}}, the document model for displaying the page in the {{glossary("browser")}}.
See also
- The {{domxref("Element")}} interface, representing an element in the DOM.
- More details about elements.