Element (W3C DOM Core object)

Spec
Version Depr. Parent
DOM1 No Node
Browser support (more…)
IE5.5+ FF1.5+ SA1.3+ OP9+
Buggy Buggy Buggy Buggy

Example

<p>
  <q>Don't be too proud of this technological terror you've constructed.
  The ability to destroy a planet is <strong>insignificant</strong>
  next to the power of The Force.</q>
</p>

In the example above, the <p>, <q> and <strong> are all Element nodes.

Description

The Element interface inherits from Node, and represents a single element in an HTML or XML document.

An Element node may have other Element, Text, Comment, ProcessingInstruction, CDATASection or EntityReference nodes as children.

Compatibility

Internet Explorer Firefox Safari Opera
5.5 6.0 7.0 1.5 2.0 3.0 1.3 2.0 3.0 9.0 9.5
Buggy Buggy Buggy Buggy Buggy Buggy Buggy Buggy Buggy Buggy Buggy

Internet Explorer doesn't implement the following:

Additionally, Internet Explorer 5.5 in HTML doesn't implement the following (but does in XML):

Internet Explorer 5.5 has only a partial implementation of getElementsByTagName.

Internet Explorer and Opera have buggy implementations of setAttribute.

Internet Explorer 6 and 7, Safari 1.3 and 2 and Opera 9.0 have buggy implementations of setAttributeNode.

Firefox, Safari 1.3 and 2 and Opera have buggy implementations of getAttributeNS, getAttributeNodeNS, hasAttributeNS, removeAttributeNS, setAttributeNS and setAttributeNodeNS.

Firefox 1.5 and 2, Safari and Opera have buggy implementations of getElementsByTagName.

Firefox and Safari have buggy implementations of hasAttribute.

Safari 1.3 and 2 have only a partial implementation of getElementsByTagNameNS.

All browsers have buggy implementations of getAttribute.

All browsers except Opera 9.0 have buggy implementations of removeAttribute and removeAttributeNode.

All browsers except Opera 9.5 have buggy implementations of getAttributeNode.

In this Section

User-contributed notes

There are no comments yet.

Related Products