--- title: Adding Nodes to the DOM --- The parser allows you to add new elements to an existing document. Find below an example for that. **Remarks** - It is not possible to create nodes via `->outertext`, `->innertext`, or `->plaintext`. These properties only change the text representation of a node and will return undesired results if used incorrectly. - Use [`$html->createElement`](/api/simple_html_dom/createElement) and [`$html->createTextNode`](/api/simple_html_dom/createTextNode) to create new nodes. - Use [`$node->appendChild`](/api/simple_html_dom_node/appendChild) to add a node as child to another node. - Nodes can be combined in any order. **Example** ```php