Elements
Last updated
Was this helpful?
Last updated
Was this helpful?
An element is a part of a webpage. In and , an element may contain a data item or a chunk of text or an image, or perhaps nothing. A typical element includes an opening tag with some , enclosed text content, and a closing tag.
Elements and are not the same things. Tags begin or end an element in source code, whereas elements are part of the , the document model for displaying the page in the .
getElementById
getElementsById
querySelector
querySelectorAll
appendChild
insertBefore
removeChild
insertAttribute
removeAttribute
cloneNode