toString
Returns a string representation of the element, including its tag name, attributes, and content.
The string representation is formatted as an HTML-like tag, with attributes in the format key="value"
. For example, an element with tag name div
, class my-class
, and content Hello World
would be represented as:
<div class="my-class">Hello World</div>
Content copied to clipboard