Element

  • Revision slug: Web/API/element
  • Revision title: Element
  • Revision id: 442625
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment

Revision Content

{{ DomRef() }}

The Element interface represents part of the document. This interface describes methods and properties common to each kind of elements. Specific behaviors are described in the specific interfaces, inheriting from Element: the {{domxref("HTMLElement")}} interface for HTML elements, the {{domxref("SVGElement")}} interface for SVG elements, or the {{domxref("MathMLElement")}} for MathML elements.

Languages outside the reals of the Web platform, like XUL through the XULElement interface, also implement it.

Properties

Inherit properties from its parents {{domxref("Node")}}, and its own parent, {{domxref("EventTarget")}}, and {{domxref("ElementTraversal")}}.

Name Description Type
{{ domxref("Node.attributes") }} A list of all attributes associated with the element. Note that starting with Firefox 22, this is no longer supported, since it's been removed from the specification. This behavior is only available through {{domxref("Element.attributes")}}. {{ domxref("NamedNodeMap") }}
{{ domxref("Node.baseURIObject") }} {{ Fx_minversion_inline("3") }} {{Non-standard_inline()}} (Not available to web content.) The read-only {{ Interface("nsIURI") }} object representing the base URI for the element. {{ Interface("nsIURI") }}
{{ domxref("ElementTraversal.childElementCount") }} The number of child nodes that are elements. Number
{{ domxref("Element.children") }} All child nodes of an element as a collection. {{ domxref("HTMLCollection") }}
{{ domxref("Element.classList") }} {{ gecko_minversion_inline("1.9.2") }} Token list of class attribute {{ domxref("DOMTokenList") }}
{{ domxref("Element.className") }} Gets/sets the class of the element.
Though the specification requires className to be defined on the {{domxref("Element")}} interface, Gecko-based browsers implement it on the {{domxref("HTMLElement")}} interface only.
String
{{ domxref("Element.clientHeight") }} {{experimental_inline}} The inner height of an element. Number
{{ domxref("Element.clientLeft") }} {{experimental_inline}} The width of the left border of an element. Number
{{ domxref("Element.clientTop") }} {{experimental_inline}} The width of the top border of an element. Number
{{ domxref("Element.clientWidth") }} {{experimental_inline}} The inner width of an element. Number
{{ domxref("ElementTraversal.firstElementChild") }} The first direct child element of an element, or null if the element has no child elements. {{ domxref("Element") }}
{{ domxref("Element.id") }} Gets/sets the id of the element. String
{{ domxref("Element.innerHTML") }} {{experimental_inline}} Gets/sets the markup of the element's content. String
{{ domxref("ElementTraversal.lastElementChild") }} The last direct child element of an element, or null if the element has no child elements. {{ domxref("Element") }}
{{ domxref("Node.localName") }} The local part of the qualified name of an element. In Firefox 3.5 and earlier, the property upper-cases the local name for HTML elements (but not XHTML elements). In later versions, this does not happen, so the property is in lower case for both HTML and XHTML. {{ gecko_minversion_inline("1.9.2") }}
Though the specification requires localName to be defined on the {{domxref("Node")}} interface, Gecko-based browsers implement it on the {{domxref("Element")}} interface.
String
{{ domxref("Element.name","name") }} /* not on Element, but on specific HTML*Element only */ Gets/sets the name attribute of an element. String
{{ domxref("Node.namespaceURI") }} The namespace URI of this node, or null if it is no namespace. In Firefox 3.5 and earlier, HTML elements are in no namespace. In later versions, HTML elements are in the http://www.w3.org/1999/xhtml namespace in both HTML and XML trees. {{ gecko_minversion_inline("1.9.2") }}
Though the specification requires namespaceURI to be defined on the {{domxref("Node")}} interface, Gecko-based browsers implement it on the {{domxref("Element")}} interface.
String
{{ domxref("ElementTraversal.nextElementSibling") }} The element immediately following the given one in the tree, or null if there's no sibling node. {{ domxref("Element") }}
{{ domxref("Node.nodePrincipal") }} {{ Fx_minversion_inline("3") }} The node's principal. {{ Interface("nsIPrincipal") }}
{{ domxref("Element.outerHTML") }} {{experimental_inline}}
 
Gets the markup of the element including its content. When used as a setter, replaces the element with nodes parsed from the given string. String
{{ domxref("Node.prefix") }} The namespace prefix of the node, or null if no prefix is specified.
Though the specification requires localName to be defined on the {{domxref("Node")}} interface, Gecko-based browsers implement it on the {{domxref("Element")}} interface.
String
{{ domxref("ElementTraversal.previousElementSibling") }} The element immediately preceding the given one in the tree, or null if there is no sibling element. {{ domxref("Element") }}
{{ domxref("Element.scrollHeight") }} {{experimental_inline}} The scroll view height of an element. Number
{{ domxref("Element.scrollLeft") }} {{experimental_inline}} Gets/sets the left scroll offset of an element. Number
{{ domxref("Element.scrollTop") }} {{experimental_inline}} Gets/sets the top scroll offset of an element. Number
{{ domxref("Element.scrollWidth") }} {{experimental_inline}} The scroll view width of an element. Number
{{ domxref("element.tagName") }} The name of the tag for the given element. String

Event handlers

{{ domxref("Element.oncopy") }} {{ Fx_minversion_inline("3") }} {{ non-standard_inline() }}
Returns the event handling code for the copy event. (bug {{bug("280959")}})
{{ domxref("Element.oncut") }} {{ Fx_minversion_inline("3") }} {{ non-standard_inline() }}
Returns the event handling code for the cut event. (bug {{bug("280959")}})
{{ domxref("Element.onpaste") }} {{ Fx_minversion_inline("3") }} {{ non-standard_inline() }}
Returns the event handling code for the paste event.(bug {{bug("280959")}})
{{ domxref("element.onwheel","onwheel") }} {{ gecko_minversion_inline("17.0") }} {{ non-standard_inline() }}
Returns the event handling code for the {{ domeventxref("wheel") }} event.

Methods

Inherit methods from its parents {{domxref("Node")}}, and its own parent, {{domxref("EventTarget")}}, and {{domxref("ElementTraversal")}}.

Name & Description Return
{{ domxref("EventTarget.addEventListener") }}( type, listener, useCapture )
Register an event handler to a specific event type on the element.
-
{{ domxref("EventTarget.dispatchEvent") }}( {{ domxref("event") }} )
Dispatch an event to this node in the DOM.
Boolean
{{ domxref("Element.getAttribute") }}( name )
Retrieve the value of the named attribute from the current node.
Object
{{ domxref("Element.getAttributeNS") }}( namespace, name )
Retrieve the value of the attribute with the specified name and namespace, from the current node.
Object
{{ domxref("Element.getAttributeNode") }}( name ) {{obsolete_inline}}
Retrieve the node representation of the named attribute from the current node.
{{ domxref("Attr") }}
{{ domxref("Element.getAttributeNodeNS") }}( namespace, name ) {{obsolete_inline}}
Retrieve the node representation of the attribute with the specified name and namespace, from the current node.
{{ domxref("Attr") }}
{{ domxref("Element.getBoundingClientRect") }} ( ){{experimental_inline}}  

{{ domxref("Element.getClientRects") }} ( ){{experimental_inline}}
Returns a collection of rectangles that indicate the bounding rectangles for each line of text in a client.

 
{{ domxref("Element.getElementsByClassName") }}( ) {{ domxref("HTMLCollection") }}
{{ domxref("Element.getElementsByTagName") }}( name )
Retrieve a set of all descendant elements, of a particular tag name, from the current element.
{{ domxref("HTMLCollection") }}
{{ domxref("Element.getElementsByTagNameNS") }}( namespace, name )
Retrieve a set of all descendant elements, of a particular tag name and namespace, from the current element.
{{ domxref("HTMLCollection") }}
{{ domxref("Element.hasAttribute") }}( name )
Check if the element has the specified attribute, or not.
Boolean
{{ domxref("Element.hasAttributeNS") }}( namespace, name )
Check if the element has the specified attribute, in the specified namespace, or not.
Boolean
{{ domxref("Element.mozMatchesSelector") }}( selector )
Returns whether or not the element would be selected by the specified selector string.
Boolean
{{ domxref("Element.mozRequestFullScreen") }}( ) {{experimental_inline}}
Asynchronously asks the browser to make the element full-screen.
-
{{ domxref("Element.querySelector") }}( selectors[, nsresolver] ) {{ domxref("Node") }}
{{ domxref("Element.querySelectorAll") }}( selectors[, nsresolver] ) {{ domxref("NodeList") }}
{{domxref("Element.remove()")}}
Remove the element.
-
{{ domxref("Element.removeAttribute") }}( name )
Remove the named attribute from the current node.
-
{{ domxref("Element.removeAttributeNS") }}( namespace, name )
Remove the attribute with the specified name and namespace, from the current node.
-
{{ domxref("Element.removeAttributeNode") }}( {{ domxref("Attr","attrNode") }} ) {{obsolete_inline}}
Remove the node representation of the named attribute from the current node.
-
{{ domxref("EventTarget.removeEventListener") }}( type, handler, useCapture )
Removes an event listener from the element.
-
{{ domxref("Element.scrollIntoView") }}( alignWithTop ) {{experimental_inline}}
Scrolls the page until the element gets into the view.
-
{{ domxref("Element.setAttribute") }}( name, value )
Set the value of the named attribute from the current node.
-
{{ domxref("Element.setAttributeNS") }}( namespace, name, value )
Set the value of the attribute with the specified name and namespace, from the current node.
-
{{ domxref("Element.setAttributeNode") }}( name, {{ domxref("Attr","attrNode") }} ){{obsolete_inline}}
Set the node representation of the named attribute from the current node.
-
{{ domxref("Element.setAttributeNodeNS") }}( namespace, name, {{ domxref("Attr","attrNode") }} ){{obsolete_inline}}
Set the node representation of the attribute with the specified name and namespace, from the current node.
-
{{ domxref("Element.setCapture") }}( retargetToElement ) {{non-standard_inline}}
Sets up mouse event capture, redirecting all mouse events to this element.
-
{{ domxref("Element.insertAdjacentHTML") }} ( {{ domxref("DOMString","position") }}, {{ domxref("DOMString","text") }} ) {{experimental_inline}}
Parses the text as HTML or XML and inserts the resulting nodes into the tree in the position given.
-

Specifications

Specification Status Comment
{{SpecName('Pointer Events', '#extensions-to-the-element-interface', 'Element')}} {{Spec2('Pointer Events')}} Added the following event handlers: ongotpointercapture and onlostpointercapture.
Added the following methods: setPointerCapture() and releasePointerCapture().
{{SpecName('Selectors API Level 2', '#interface-definitions', 'Element')}} {{Spec2('Selectors API Level 2')}} Added the following methods: matches() (implemented as mozMatchesSelector()), find(), findAll().
{{SpecName('Selectors API Level 1', '#interface-definitions', 'Element')}} {{Spec2('Selectors API Level 1')}} Added the following methods: querySelector() and querySelectorAll().
{{SpecName('Pointer Lock', 'index.html#element-interface', 'Element')}} {{Spec2('Pointer Lock')}} Added the requestPointerLock() method.
{{SpecName('Fullscreen', '#api', 'Element')}} {{Spec2('Fullscreen')}} Added the requestFullscreen() method.
{{SpecName('DOM Parsing', '#extensions-to-the-element-interface', 'Element')}} {{Spec2('DOM Parsing')}} Added the following properties: innerHTML, and outerHTML.
Added the following method: insertAdjacentHTML().
{{SpecName('CSSOM View', '#extensions-to-the-element-interface', 'Element')}} {{Spec2('CSSOM View')}} Added the following properties: scrollTop, scrollLeft, scrollWidth, scrollHeight, clientTop, clientLeft, clientWidth, and clientHeight.
Added the following methods: getClientRects(), getBoundingClientRect(), and scrollIntoView().
{{SpecName('Element Traversal', '#ecmascript-bindings', 'Element')}} {{Spec2('Element Traversal')}} Added inheritance of the {{domxref("ElementTraversal")}} interface.
{{SpecName('DOM WHATWG', '#interface-element', 'Element')}} {{Spec2('DOM WHATWG')}} Removed the following methods: setIdAttribute(), setIdAttributeNS(), and setIdAttributeNode().
Removed the schemaTypeInfo property.
{{SpecName('DOM3 Core', 'core.html#ID-745549614', 'Element')}} {{Spec2('DOM3 Core')}} Added the following methods: setIdAttribute(), setIdAttributeNS(), and setIdAttributeNode(). These methods were never implemented and have been removed in later specifications.
Added the schemaTypeInfo property. This property was never implemented and has been removed in later specifications.
{{SpecName('DOM2 Core', 'core.html#ID-745549614', 'Element')}} {{Spec2('DOM2 Core')}} The normalize() method has been moved to {{domxref("Node")}}.
{{SpecName('DOM1', 'level-one-core.html#ID-745549614', 'Element')}} {{Spec2('DOM1')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 1.0 {{CompatGeckoDesktop("1")}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} 1.0
children   {{CompatGeckoDesktop("1.9")}} 7.0 with a significant bug [1]
9.0 according the spec
   
childElementCount, nextElementSibling, previousElementSibling   {{CompatGeckoDesktop("1.9.1")}} 9.0    
firstElementChild, lastElementChild   {{CompatGeckoDesktop("1.9")}} 9.0    
classList   {{CompatGeckoDesktop("1.9.2")}}      
outerHTML {{experimental_inline}} {{CompatVersionUnknown}} {{CompatGeckoDesktop("11")}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
clientLeft, clientTop {{experimental_inline}}   {{CompatGeckoDesktop("1.9.1")}} {{CompatVersionUnknown}}    
getBoundingClientRect(), getClientRects() {{experimental_inline}}   {{CompatGeckoDesktop("1.9")}} {{CompatVersionUnknown}}    
querySelector(), querySelectorAll() 1.0 {{CompatGeckoDesktop("1.9.1")}} 8.0 10.0 3.2 (525.3)
insertAdjacentHTML() 1.0 {{CompatGeckoDesktop("8")}} 4.0 7.0 4.0 (527)
setCapture() {{non-standard_inline}} {{CompatNo}} {{CompatGeckoDesktop("2")}} {{CompatGeckoDesktop("8")}} {{CompatGeckoDesktop("8")}} {{CompatGeckoDesktop("8")}}
oncopy, oncut, onpaste {{non-standard_inline}} {{CompatNo}} {{CompatGeckoDesktop("1.9")}} {{CompatVersionUnknown}}   {{CompatNo}}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 1.0 {{CompatGeckoMobile("1")}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} 1.0

[1] Internet Explorer 7 and 8 incorrectly return the comments as part of the children of an Element. This is fixed in Internet Explorer 9 and later.

Revision Source

<p>{{ DomRef() }}</p>
<p>The <strong><code>Element</code></strong> interface represents part of the document. This interface describes methods and properties common to each kind of elements. Specific behaviors are described in the specific interfaces, inheriting from <code>Element</code>: the {{domxref("HTMLElement")}} interface for HTML elements, the {{domxref("SVGElement")}} interface for SVG elements, or the {{domxref("MathMLElement")}} for MathML elements.</p>
<p>Languages outside the reals of the Web platform, like XUL through the <code>XULElement</code> interface, also implement it.</p>
<h2 id="Properties" name="Properties">Properties</h2>
<p><em>Inherit properties from its parents {{domxref("Node")}}, and its own parent, {{domxref("EventTarget")}}, and {{domxref("ElementTraversal")}}.</em></p>
<table class="fullwidth-table">
  <tbody>
    <tr>
      <th>Name</th>
      <th>Description</th>
      <th>Type</th>
    </tr>
    <tr>
      <td>{{ domxref("Node.attributes") }}</td>
      <td>A list of all attributes associated with the element. Note that starting with Firefox 22, this is no longer supported, since it's been removed from the specification. This behavior is only available through {{domxref("Element.attributes")}}.</td>
      <td><code>{{ domxref("NamedNodeMap") }}</code></td>
    </tr>
    <tr>
      <td>{{ domxref("Node.baseURIObject") }} {{ Fx_minversion_inline("3") }} {{Non-standard_inline()}}</td>
      <td>(Not available to web content.) The read-only {{ Interface("nsIURI") }} object representing the base URI for the element.</td>
      <td>{{ Interface("nsIURI") }}</td>
    </tr>
    <tr>
      <td>{{ domxref("ElementTraversal.childElementCount") }}</td>
      <td>The number of child nodes that are elements.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/Number" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Number">Number</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.children") }}</td>
      <td>All child nodes of an element as a collection.</td>
      <td>{{ domxref("HTMLCollection") }}</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.classList") }} {{ gecko_minversion_inline("1.9.2") }}</td>
      <td>Token list of class attribute</td>
      <td>{{ domxref("DOMTokenList") }}</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.className") }}</td>
      <td>Gets/sets the class of the element.<br />
        Though the specification requires <code>className</code> to be defined on the {{domxref("Element")}} interface, Gecko-based browsers implement it on the {{domxref("HTMLElement")}} interface only.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">String</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.clientHeight") }} {{experimental_inline}}</td>
      <td>The inner height of an element.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/Number" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Number">Number</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.clientLeft") }} {{experimental_inline}}</td>
      <td>The width of the left border of an element.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/Number" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Number">Number</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.clientTop") }} {{experimental_inline}}</td>
      <td>The width of the top border of an element.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/Number" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Number">Number</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.clientWidth") }} {{experimental_inline}}</td>
      <td>The inner width of an element.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/Number" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Number">Number</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("ElementTraversal.firstElementChild") }}</td>
      <td>The first direct child element of an element, or <code>null</code> if the element has no child elements.</td>
      <td>{{ domxref("Element") }}</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.id") }}</td>
      <td>Gets/sets the id of the element.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">String</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.innerHTML") }} {{experimental_inline}}</td>
      <td>Gets/sets the markup of the element's content.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">String</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("ElementTraversal.lastElementChild") }}</td>
      <td>The last direct child element of an element, or <code>null</code> if the element has no child elements.</td>
      <td>{{ domxref("Element") }}</td>
    </tr>
    <tr>
      <td>{{ domxref("Node.localName") }}</td>
      <td>The local part of the qualified name of an element. In Firefox 3.5 and earlier, the property upper-cases the local name for HTML&nbsp;elements (but not XHTML&nbsp;elements). In later versions, this does not happen, so the property is in lower case for both HTML&nbsp;and XHTML. {{ gecko_minversion_inline("1.9.2") }}<br />
        Though the specification requires <code>localName</code> to be defined on the {{domxref("Node")}} interface, Gecko-based browsers implement it on the {{domxref("Element")}} interface.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">String</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.name","name") }} /* not on Element, but on specific HTML*Element only */</td>
      <td>Gets/sets the name attribute of an element.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">String</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("Node.namespaceURI") }}</td>
      <td>The namespace URI of this node, or <code>null</code> if it is no namespace. In Firefox 3.5 and earlier, HTML&nbsp;elements are in no namespace. In later versions, HTML&nbsp;elements are in the <code><a class="linkification-ext external" href="http://www.w3.org/1999/xhtml" title="Linkification: http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a></code> namespace in both HTML&nbsp;and XML&nbsp;trees. {{ gecko_minversion_inline("1.9.2") }}<br />
        Though the specification requires <code>namespaceURI</code> to be defined on the {{domxref("Node")}} interface, Gecko-based browsers implement it on the {{domxref("Element")}} interface.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">String</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("ElementTraversal.nextElementSibling") }}</td>
      <td>The element immediately following the given one in the tree, or <code>null</code> if there's no sibling node.</td>
      <td>{{ domxref("Element") }}</td>
    </tr>
    <tr>
      <td>{{ domxref("Node.nodePrincipal") }} {{ Fx_minversion_inline("3") }}</td>
      <td>The node's principal.</td>
      <td><code>{{ Interface("nsIPrincipal") }}</code></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.outerHTML") }} {{experimental_inline}}<br />
        &nbsp;</td>
      <td>Gets the markup of the element including its content. When used as a setter, replaces the element with nodes parsed from the given string.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">String</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("Node.prefix") }}</td>
      <td>The namespace prefix of the node, or <code>null</code> if no prefix is specified.<br />
        Though the specification requires <code>localName</code> to be defined on the {{domxref("Node")}} interface, Gecko-based browsers implement it on the {{domxref("Element")}} interface.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">String</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("ElementTraversal.previousElementSibling") }}</td>
      <td>The element immediately preceding the given one in the tree, or <code>null</code> if there is no sibling element.</td>
      <td>{{ domxref("Element") }}</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.scrollHeight") }} {{experimental_inline}}</td>
      <td>The scroll view height of an element.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/Number" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Number">Number</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.scrollLeft") }} {{experimental_inline}}</td>
      <td>Gets/sets the left scroll offset of an element.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/Number" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Number">Number</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.scrollTop") }} {{experimental_inline}}</td>
      <td>Gets/sets the top scroll offset of an element.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/Number" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Number">Number</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.scrollWidth") }} {{experimental_inline}}</td>
      <td>The scroll view width of an element.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/Number" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Number">Number</a></code></td>
    </tr>
    <tr>
      <td>{{ domxref("element.tagName") }}</td>
      <td>The name of the tag for the given element.</td>
      <td><code><a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">String</a></code></td>
    </tr>
  </tbody>
</table>
<h3 id="Methods" name="Methods">Event handlers</h3>
<dl>
  <dt>
    {{ domxref("Element.oncopy") }} {{ Fx_minversion_inline("3") }} {{ non-standard_inline() }}</dt>
  <dd>
    Returns the event handling code for the <code>copy</code> event. (bug {{bug("280959")}})</dd>
</dl>
<dl>
  <dt>
    {{ domxref("Element.oncut") }} {{ Fx_minversion_inline("3") }} {{ non-standard_inline() }}</dt>
  <dd>
    Returns the event handling code for the <code>cut</code> event. (bug {{bug("280959")}})</dd>
</dl>
<dl>
  <dt>
    {{ domxref("Element.onpaste") }} {{ Fx_minversion_inline("3") }} {{ non-standard_inline() }}</dt>
  <dd>
    Returns the event handling code for the <code>paste</code> event.(bug {{bug("280959")}})</dd>
</dl>
<dl>
  <dt>
    {{ domxref("element.onwheel","onwheel") }} {{ gecko_minversion_inline("17.0") }} {{ non-standard_inline() }}</dt>
  <dd>
    Returns the event handling code for the {{ domeventxref("wheel") }} event.</dd>
</dl>
<h2 id="Methods" name="Methods">Methods</h2>
<p><em>Inherit methods from its parents {{domxref("Node")}}, and its own parent, {{domxref("EventTarget")}}, and {{domxref("ElementTraversal")}}.</em></p>
<table class="fullwidth-table">
  <tbody>
    <tr>
      <th>Name &amp; Description</th>
      <th>Return</th>
    </tr>
    <tr>
      <td>{{ domxref("EventTarget.addEventListener") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">type</a>, <a href="/en/JavaScript/Reference/Global_Objects/Function" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Function">listener</a>, <a href="/en/JavaScript/Reference/Global_Objects/Boolean" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">useCapture</a> )</code><br />
        Register an event handler to a specific event type on the element.</td>
      <td>-</td>
    </tr>
    <tr>
      <td>{{ domxref("EventTarget.dispatchEvent") }}<code>( {{ domxref("event") }} )</code><br />
        Dispatch an event to this node in the DOM.</td>
      <td><a href="/en/JavaScript/Reference/Global_Objects/Boolean" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">Boolean</a></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.getAttribute") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a> )</code><br />
        Retrieve the value of the named attribute from the current node.</td>
      <td><a href="/en/JavaScript/Reference/Global_Objects/Object" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.getAttributeNS") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">namespace</a>, <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a> )</code><br />
        Retrieve the value of the attribute with the specified name and namespace, from the current node.</td>
      <td><a href="/en/JavaScript/Reference/Global_Objects/Object" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.getAttributeNode") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a> )</code> {{obsolete_inline}}<br />
        Retrieve the node representation of the named attribute from the current node.</td>
      <td>{{ domxref("Attr") }}</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.getAttributeNodeNS") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">namespace</a>, <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a> )</code> {{obsolete_inline}}<br />
        Retrieve the node representation of the attribute with the specified name and namespace, from the current node.</td>
      <td>{{ domxref("Attr") }}</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.getBoundingClientRect") }}<code> ( )</code>{{experimental_inline}}</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>
        <p>{{ domxref("Element.getClientRects") }}<code> ( )</code>{{experimental_inline}}<br />
          Returns a collection of rectangles that indicate the bounding rectangles for each line of text in a client.</p>
      </td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.getElementsByClassName") }}<code>( )</code></td>
      <td>{{ domxref("HTMLCollection") }}</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.getElementsByTagName") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a> )</code><br />
        Retrieve a set of all descendant elements, of a particular tag name, from the current element.</td>
      <td>{{ domxref("HTMLCollection") }}</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.getElementsByTagNameNS") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">namespace</a>, <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a> )</code><br />
        Retrieve a set of all descendant elements, of a particular tag name and namespace, from the current element.</td>
      <td>{{ domxref("HTMLCollection") }}</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.hasAttribute") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a> )</code><br />
        Check if the element has the specified attribute, or not.</td>
      <td><a href="/en/JavaScript/Reference/Global_Objects/Boolean" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">Boolean</a></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.hasAttributeNS") }}(<code> <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">namespace</a>, <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a> )</code><br />
        Check if the element has the specified attribute, in the specified namespace, or not.</td>
      <td><a href="/en/JavaScript/Reference/Global_Objects/Boolean" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">Boolean</a></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.mozMatchesSelector") }}<code>( selector )</code><br />
        Returns whether or not the element would be selected by the specified selector string.</td>
      <td><a href="/en/JavaScript/Reference/Global_Objects/Boolean" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">Boolean</a></td>
    </tr>
    <tr>
      <td>{{ domxref("Element.mozRequestFullScreen") }}<code>( )</code> {{experimental_inline}}<br />
        Asynchronously asks the browser to make the element full-screen.</td>
      <td>-</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.querySelector") }}<code>( selectors[, nsresolver] )</code></td>
      <td>{{ domxref("Node") }}</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.querySelectorAll") }}<code>( selectors[, nsresolver] )</code></td>
      <td>{{ domxref("NodeList") }}</td>
    </tr>
    <tr>
      <td>{{domxref("Element.remove()")}}<br />
        Remove the element.</td>
      <td>-</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.removeAttribute") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a> )</code><br />
        Remove the named attribute from the current node.</td>
      <td>-</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.removeAttributeNS") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">namespace</a>, <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a> )</code><br />
        Remove the attribute with the specified name and namespace, from the current node.</td>
      <td>-</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.removeAttributeNode") }}<code>( </code>{{ domxref("Attr","attrNode") }}<code> )</code> {{obsolete_inline}}<br />
        Remove the node representation of the named attribute from the current node.</td>
      <td>-</td>
    </tr>
    <tr>
      <td>{{ domxref("EventTarget.removeEventListener") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">type</a>, <a href="/en/JavaScript/Reference/Global_Objects/Function" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Function">handler</a>, <a href="/en/JavaScript/Reference/Global_Objects/Boolean" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">useCapture</a> )</code><br />
        Removes an event listener from the element.</td>
      <td>-</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.scrollIntoView") }}<code>( <a href="/en/JavaScript/Reference/Global_Objects/Boolean" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">alignWithTop</a> )</code> {{experimental_inline}}<br />
        Scrolls the page until the element gets into the view.</td>
      <td>-</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.setAttribute") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a>, <a href="/en/JavaScript/Reference/Global_Objects/Object" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Object">value</a> )</code><br />
        Set the value of the named attribute from the current node.</td>
      <td>-</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.setAttributeNS") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">namespace</a>, <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a>, <a href="/en/JavaScript/Reference/Global_Objects/Object" title="en/Core_JavaScript_1.5_Reference/Global_Objects/Object">value</a> )</code><br />
        Set the value of the attribute with the specified name and namespace, from the current node.</td>
      <td>-</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.setAttributeNode") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a>, </code>{{ domxref("Attr","attrNode") }}<code> )</code>{{obsolete_inline}}<br />
        Set the node representation of the named attribute from the current node.</td>
      <td>-</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.setAttributeNodeNS") }}<code>( <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">namespace</a>, <a href="/En/Core_JavaScript_1.5_Reference/Global_Objects/String" title="en/Core_JavaScript_1.5_Reference/Global_Objects/String">name</a>, </code>{{ domxref("Attr","attrNode") }}<code> )</code>{{obsolete_inline}}<br />
        Set the node representation of the attribute with the specified name and namespace, from the current node.</td>
      <td>-</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.setCapture") }}<code>( retargetToElement )</code> {{non-standard_inline}}<br />
        Sets up mouse event capture, redirecting all mouse events to this element.</td>
      <td>-</td>
    </tr>
    <tr>
      <td>{{ domxref("Element.insertAdjacentHTML") }} <code>( </code>{{ domxref("DOMString","position") }}<code>, </code>{{ domxref("DOMString","text") }}<code> )</code> {{experimental_inline}}<br />
        Parses the text as HTML or XML and inserts the resulting nodes into the tree in the position given.</td>
      <td>-</td>
    </tr>
  </tbody>
</table>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{SpecName('Pointer Events', '#extensions-to-the-element-interface', 'Element')}}</td>
      <td>{{Spec2('Pointer Events')}}</td>
      <td>Added the following event handlers: <code>ongotpointercapture</code> and <code>onlostpointercapture</code>.<br />
        Added the following methods: <code>setPointerCapture()</code> and <code>releasePointerCapture()</code>.</td>
    </tr>
    <tr>
      <td>{{SpecName('Selectors API Level 2', '#interface-definitions', 'Element')}}</td>
      <td>{{Spec2('Selectors API Level 2')}}</td>
      <td>Added the following methods:<code> matches()</code> (implemented as <code>mozMatchesSelector()</code>), <code>find()</code>, <code>findAll()</code>.</td>
    </tr>
    <tr>
      <td>{{SpecName('Selectors API Level 1', '#interface-definitions', 'Element')}}</td>
      <td>{{Spec2('Selectors API Level 1')}}</td>
      <td>Added the following methods: <code>querySelector()</code> and <code>querySelectorAll()</code>.</td>
    </tr>
    <tr>
      <td>{{SpecName('Pointer Lock', 'index.html#element-interface', 'Element')}}</td>
      <td>{{Spec2('Pointer Lock')}}</td>
      <td>Added the <code>requestPointerLock()</code> method.</td>
    </tr>
    <tr>
      <td>{{SpecName('Fullscreen', '#api', 'Element')}}</td>
      <td>{{Spec2('Fullscreen')}}</td>
      <td>Added the <code>requestFullscreen()</code> method.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM Parsing', '#extensions-to-the-element-interface', 'Element')}}</td>
      <td>{{Spec2('DOM Parsing')}}</td>
      <td>Added the following properties: <code>innerHTML</code>, and <code>outerHTML</code>.<br />
        Added the following method: <code>insertAdjacentHTML()</code>.</td>
    </tr>
    <tr>
      <td>{{SpecName('CSSOM View', '#extensions-to-the-element-interface', 'Element')}}</td>
      <td>{{Spec2('CSSOM View')}}</td>
      <td>Added the following properties: <code>scrollTop</code>, <code>scrollLeft</code>, <code>scrollWidth</code>, <code>scrollHeight</code>, <code>clientTop</code>, <code>clientLeft</code>, <code>clientWidth</code>, and <code>clientHeight</code>.<br />
        Added the following methods: <code>getClientRects()</code>, <code>getBoundingClientRect()</code>, and <code>scrollIntoView()</code>.</td>
    </tr>
    <tr>
      <td>{{SpecName('Element Traversal', '#ecmascript-bindings', 'Element')}}</td>
      <td>{{Spec2('Element Traversal')}}</td>
      <td>Added inheritance of the {{domxref("ElementTraversal")}} interface.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM WHATWG', '#interface-element', 'Element')}}</td>
      <td>{{Spec2('DOM WHATWG')}}</td>
      <td>Removed the following methods: <code>setIdAttribute()</code>, <code>setIdAttributeNS()</code>, and <code>setIdAttributeNode()</code>.<br />
        Removed the <code>schemaTypeInfo</code> property.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM3 Core', 'core.html#ID-745549614', 'Element')}}</td>
      <td>{{Spec2('DOM3 Core')}}</td>
      <td>Added the following methods: <code>setIdAttribute()</code>, <code>setIdAttributeNS()</code>, and <code>setIdAttributeNode()</code>. These methods were never implemented and have been removed in later specifications.<br />
        Added the <code>schemaTypeInfo</code> property. This property was never implemented and has been removed in later specifications.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM2 Core', 'core.html#ID-745549614', 'Element')}}</td>
      <td>{{Spec2('DOM2 Core')}}</td>
      <td>The <code>normalize()</code> method has been moved to {{domxref("Node")}}.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM1', 'level-one-core.html#ID-745549614', 'Element')}}</td>
      <td>{{Spec2('DOM1')}}</td>
      <td>Initial definition.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<div>
  {{CompatibilityTable}}</div>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0</td>
        <td>{{CompatGeckoDesktop("1")}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>1.0</td>
      </tr>
      <tr>
        <td><code>children</code></td>
        <td>&nbsp;</td>
        <td>{{CompatGeckoDesktop("1.9")}}</td>
        <td>7.0 with a significant bug [1]<br />
          9.0 according the spec</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><code>childElementCount</code>, <code>nextElementSibling</code>, <code>previousElementSibling</code></td>
        <td>&nbsp;</td>
        <td>{{CompatGeckoDesktop("1.9.1")}}</td>
        <td>9.0</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><code>firstElementChild</code>, <code>lastElementChild</code></td>
        <td>&nbsp;</td>
        <td>{{CompatGeckoDesktop("1.9")}}</td>
        <td>9.0</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><code>classList</code></td>
        <td>&nbsp;</td>
        <td>{{CompatGeckoDesktop("1.9.2")}}</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><code>outerHTML</code> {{experimental_inline}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatGeckoDesktop("11")}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
      <tr>
        <td><code>clientLeft</code>, <code>clientTop</code> {{experimental_inline}}</td>
        <td>&nbsp;</td>
        <td>{{CompatGeckoDesktop("1.9.1")}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><code>getBoundingClientRect()</code>, <code>getClientRects()</code> {{experimental_inline}}</td>
        <td>&nbsp;</td>
        <td>{{CompatGeckoDesktop("1.9")}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><code>querySelector()</code>, <code>querySelectorAll()</code></td>
        <td>1.0</td>
        <td>{{CompatGeckoDesktop("1.9.1")}}</td>
        <td>8.0</td>
        <td>10.0</td>
        <td>3.2 (525.3)</td>
      </tr>
      <tr>
        <td><code>insertAdjacentHTML()</code></td>
        <td>1.0</td>
        <td>{{CompatGeckoDesktop("8")}}</td>
        <td>4.0</td>
        <td>7.0</td>
        <td>4.0 (527)</td>
      </tr>
      <tr>
        <td><code>setCapture() </code>{{non-standard_inline}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatGeckoDesktop("2")}}</td>
        <td>{{CompatGeckoDesktop("8")}}</td>
        <td>{{CompatGeckoDesktop("8")}}</td>
        <td>{{CompatGeckoDesktop("8")}}</td>
      </tr>
      <tr>
        <td><code>oncopy</code>, <code>oncut</code>, <code>onpaste</code> {{non-standard_inline}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatGeckoDesktop("1.9")}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>&nbsp;</td>
        <td>{{CompatNo}}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0</td>
        <td>{{CompatGeckoMobile("1")}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>1.0</td>
      </tr>
    </tbody>
  </table>
</div>
<p>[1] Internet Explorer 7 and 8 incorrectly return the comments as part of the children of an Element. This is fixed in Internet Explorer 9 and later.</p>
Revert to this revision