Revision 422343 of HTMLHRElement

  • Revision slug: Web/API/HTMLHRElement
  • Revision title: HTMLHRElement
  • Revision id: 422343
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment

Revision Content

{{DomRef}}

The HTMLHRElement interface provides special properties (beyond those of the {{domxref("HTMLElement")}} interface it also has available to it by inheritance) for manipulating {{HTMLElement("hr")}} elements.

Properties

Inherits properties from its parent, {{domxref("HTMLElement")}}.

Name Type Description
align {{obsolete_inline}} {{domxref("DOMString")}} Enumerated attribute indicating alignment of the rule with respect to the surrounding context.
color {{obsolete_inline}} {{domxref("DOMString")}} The name of the color of the rule.
noshade {{obsolete_inline}} {{domxref("Boolean")}} Sets the rule to have no shading.
size {{obsolete_inline}} {{domxref("DOMString")}} The height of the rule.
width {{obsolete_inline}} {{domxref("DOMString")}} The width of the rule on the page.

Methods

No specific method; inherits methods from its parent, {{domxref("HTMLElement")}}.

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', "text-level-semantics.htmlgrouping-content.html#the-hr-element", "HTMLHRElement")}} {{Spec2('HTML WHATWG')}} The color property has been added, as an obsolete property, to increase compatibility with the existing web.
{{SpecName('HTML5 W3C', "grouping-content.html#the-hr-element", "HTMLAnchorElement")}} {{Spec2('HTML5 W3C')}} Following properties are now obsolete: align, noshade, size, and width.
{{SpecName('DOM2 HTML', 'html.html#ID-68228811', 'HTMLHRElement')}} {{Spec2('DOM2 HTML')}} No change from {{SpecName("DOM1")}}.
{{SpecName('DOM1', 'level-one-html.html#ID-68228811', 'HTMLHRElement')}} {{Spec2('DOM1')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatVersionUnknown}} {{CompatGeckoDesktop(1.0)}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}} {{CompatGeckoMobile(1.0)}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}

See also

  • The HTML element implementing this interface: {{HTMLElement("hr")}}

Revision Source

<div>
  {{DomRef}}</div>
<p>The <strong><code>HTMLHRElement</code></strong> interface provides special properties (beyond those of the {{domxref("HTMLElement")}} interface it also has available to it by inheritance) for manipulating {{HTMLElement("hr")}} elements.</p>
<h2 id="Properties">Properties</h2>
<p><em>Inherits properties from its parent, {{domxref("HTMLElement")}}.</em></p>
<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> {{obsolete_inline}}</td>
      <td>{{domxref("DOMString")}}</td>
      <td>Enumerated attribute indicating alignment of the rule with respect to the surrounding context.</td>
    </tr>
    <tr>
      <td><code>color</code> {{obsolete_inline}}</td>
      <td>{{domxref("DOMString")}}</td>
      <td>The name of the color of the rule.</td>
    </tr>
    <tr>
      <td><code>noshade</code> {{obsolete_inline}}</td>
      <td>{{domxref("Boolean")}}</td>
      <td>Sets the rule to have no shading.</td>
    </tr>
    <tr>
      <td><code>size</code> {{obsolete_inline}}</td>
      <td>{{domxref("DOMString")}}</td>
      <td>The height of the rule.</td>
    </tr>
    <tr>
      <td><code>width</code> {{obsolete_inline}}</td>
      <td>{{domxref("DOMString")}}</td>
      <td>The width of the rule on the page.</td>
    </tr>
  </tbody>
</table>
<h2 id="Methods">Methods</h2>
<p><em>No specific method; inherits methods from its parent, {{domxref("HTMLElement")}}</em>.</p>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
  <tbody>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
    <tr>
      <td>{{SpecName('HTML WHATWG', "text-level-semantics.htmlgrouping-content.html#the-hr-element", "HTMLHRElement")}}</td>
      <td>{{Spec2('HTML WHATWG')}}</td>
      <td>The <code>color</code> property has been added, as an obsolete property, to increase compatibility with the existing web.</td>
    </tr>
    <tr>
      <td>{{SpecName('HTML5 W3C', "grouping-content.html#the-hr-element", "HTMLAnchorElement")}}</td>
      <td>{{Spec2('HTML5 W3C')}}</td>
      <td>Following properties are now obsolete: <code>align</code>, <code>noshade</code>, <code>size</code>, and <code>width</code>.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM2 HTML', 'html.html#ID-68228811', 'HTMLHRElement')}}</td>
      <td>{{Spec2('DOM2 HTML')}}</td>
      <td>No change from {{SpecName("DOM1")}}.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM1', 'level-one-html.html#ID-68228811', 'HTMLHRElement')}}</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>{{CompatVersionUnknown}}</td>
        <td>{{CompatGeckoDesktop(1.0)}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</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>{{CompatVersionUnknown}}</td>
        <td>{{CompatGeckoMobile(1.0)}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li>The HTML element implementing this interface: {{HTMLElement("hr")}}</li>
</ul>
Revert to this revision