An element is a part of a webpage. In XML and HTML, an element might contain a data item or a chunk of text or an image. A typical element includes an opening {{glossary("tag")}}, {{glossary("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.