The Dom\Element class
Represents an element.
Intro
Represents an element.
This is the modern, spec-compliant equivalent of DOMElement.
Class synopsis
Properties
namespaceURIThe namespace URI of the element.
prefixThe namespace prefix of the element.
localNameThe local name of the element.
tagNameThe HTML-uppercased qualified name of the element.
classListReturns an instance of
Dom\TokenListto easily manage the classes on this element.attributesReturns an instance of
Dom\NamedNodeMapthat represents the attributes of this element.innerHTMLThe inner HTML (or XML for XML documents) of the element.
outerHTMLThe outer HTML (or XML for XML documents) of the element, including the element itself. Available as of PHP 8.5.0.
substitutedNodeValueThe node value with entity substitution enabled.