> For the complete documentation index, see [llms.txt](https://docs.novarietygames.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.novarietygames.com/websitecreator/luascript/dom/elements.md).

# Elements

An **element** is a part of a webpage. In [XML](https://developer.mozilla.org/en-US/docs/Glossary/XML) and [HTML](https://developer.mozilla.org/en-US/docs/Glossary/HTML), 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 [attributes](https://developer.mozilla.org/en-US/docs/Glossary/Attribute), enclosed text content, and a closing tag.

<img src="https://developer.mozilla.org/en-US/docs/Glossary/Element/anatomy-of-an-html-element.png" alt="Example: in <p class=&#x22;nice&#x22;>Hello world!</p>, &#x27;<p class=&#x22;nice&#x22;>&#x27; is an opening tag, &#x27;class=&#x22;nice&#x22;&#x27; is an attribute and its value, &#x27;Hello world!&#x27; is enclosed text content, and &#x27;</p>&#x27; is a closing tag." height="181" width="609">

Elements and [tags](https://developer.mozilla.org/en-US/docs/Glossary/Tag) are *not* the same things. Tags begin or end an element in source code, whereas elements are part of the [DOM](https://developer.mozilla.org/en-US/docs/Glossary/DOM), the document model for displaying the page in the [browser](https://developer.mozilla.org/en-US/docs/Glossary/Browser).

<table><thead><tr><th>Functions</th><th>Documentation</th><th data-hidden></th></tr></thead><tbody><tr><td>getElementById</td><td><a data-mention href="/websitecreator/luascript/dom/elements/getelementbyid.md">getElementById</a></td><td></td></tr><tr><td>getElementsById</td><td><a data-mention href="/websitecreator/luascript/dom/elements/getelementsbyid.md">getElementsById</a></td><td></td></tr><tr><td>querySelector</td><td><a data-mention href="/websitecreator/luascript/dom/elements/queryselector.md">querySelector</a></td><td></td></tr><tr><td>querySelectorAll</td><td><a data-mention href="/websitecreator/luascript/dom/elements/queryselectorall.md">querySelectorAll</a></td><td></td></tr><tr><td>appendChild</td><td><a data-mention href="/websitecreator/luascript/dom/elements/appendchild.md">appendChild</a></td><td></td></tr><tr><td>insertBefore</td><td><a data-mention href="/websitecreator/luascript/dom/elements/insertbefore.md">insertBefore</a></td><td></td></tr><tr><td>removeChild</td><td><a data-mention href="/websitecreator/luascript/dom/elements/removechild.md">removeChild</a></td><td></td></tr><tr><td>insertAttribute</td><td><a data-mention href="/websitecreator/luascript/dom/elements/insertattribute.md">insertAttribute</a></td><td></td></tr><tr><td>removeAttribute</td><td><a data-mention href="/websitecreator/luascript/dom/elements/removeattribute.md">removeAttribute</a></td><td></td></tr><tr><td>cloneNode</td><td><a data-mention href="/websitecreator/luascript/dom/elements/clonenode.md">cloneNode</a></td><td></td></tr></tbody></table>
