Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 301589 of HTMLHRElement

  • Revision slug: DOM/HTMLHRElement
  • Revision title: HTMLHRElement
  • Revision id: 301589
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment

Revision Content

{{DomRef()}}

HTML hr element interface

DOM hr elements expose the HTMLHRElement (or {{HTMLVersionInline("4")}} HTMLHRElement) interface, which provides special properties (beyond the regular element object interface they also have available to them by inheritance) for manipulating hr elements. In {{HTMLVersionInline("5")}}, this interface inherits from HTMLElement, but defines no additional members.

Properties

Name Type Description
align {{deprecatedGeneric("inline","HTML4.01")}} {{obsoleteGeneric("inline","HTML5")}} DOMString Enumerated attribute indicating alignment of the rule with respect to the surrounding context.
noshade {{deprecatedGeneric("inline","HTML4.01")}} {{obsoleteGeneric("inline","HTML5")}} Boolean Sets the rule to have no shading.
size {{deprecatedGeneric("inline","HTML4.01")}} {{obsoleteGeneric("inline","HTML5")}} DOMString The height of the rule.
width {{deprecatedGeneric("inline","HTML4.01")}} {{obsoleteGeneric("inline","HTML5")}} DOMString The width of the rule on the page.

See also

  • {{HTMLElement("hr")}} HTML element

Revision Source

<div>{{DomRef()}}</div>

<h2 id="HTML_hr_element_interface">HTML hr element interface</h2>
<p>DOM <code>hr</code> elements expose the <a class="external" href="https://www.w3.org/TR/html5/grouping-content.html#htmlhrelement" rel="external nofollow" target="_blank" title="https://www.w3.org/TR/html5/grouping-content.html#htmlhrelement">HTMLHRElement</a> (or {{HTMLVersionInline("4")}} <a class="external" href="https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-68228811" rel="external nofollow" target="_blank" title="https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-68228811"><code>HTMLHRElement</code></a>) interface, which provides special properties (beyond the regular <a href="/en-US/docs/DOM/element" rel="internal">element</a> object interface they also have available to them by inheritance) for manipulating <code>hr</code> elements. In {{HTMLVersionInline("5")}}, this interface inherits from HTMLElement, but defines no additional members.</p>
<h2 id="Properties">Properties</h2>
<table class="standard-table">
  <tbody>
    <tr>
      <th scope="col">Name</th>
      <th scope="col">Type</th>
      <th scope="col">Description</th>
    </tr>
    <tr>
      <td><code>align</code> {{deprecatedGeneric("inline","HTML4.01")}} {{obsoleteGeneric("inline","HTML5")}}</td>
      <td><a href="/en-US/docs/DOM/DOMString" title="DOM/DOMString"><code>DOMString</code></a></td>
      <td>Enumerated attribute indicating alignment of the rule with respect to the surrounding context.</td>
    </tr>
    <tr>
      <td><code>noshade</code> {{deprecatedGeneric("inline","HTML4.01")}} {{obsoleteGeneric("inline","HTML5")}}</td>
      <td>Boolean</td>
      <td>Sets the rule to have no shading.</td>
    </tr>
    <tr>
      <td><code>size</code> {{deprecatedGeneric("inline","HTML4.01")}} {{obsoleteGeneric("inline","HTML5")}}</td>
      <td><a href="/en-US/docs/DOM/DOMString" title="DOM/DOMString"><code>DOMString</code></a></td>
      <td>The height of the rule.</td>
    </tr>
    <tr>
      <td><code>width</code> {{deprecatedGeneric("inline","HTML4.01")}} {{obsoleteGeneric("inline","HTML5")}}</td>
      <td><a href="/en-US/docs/DOM/DOMString" title="DOM/DOMString"><code>DOMString</code></a></td>
      <td>The width of the rule on the page.</td>
    </tr>
  </tbody>
</table>

<h2 id="See_also">See also</h2>
<ul>
  <li>{{HTMLElement("hr")}} HTML element</li>
</ul>
Revert to this revision