<hr>: The Thematic Break (Horizontal Rule) element

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

HTML <hr> элемент служит для тематического разделения абзацев.Рисует горизонтальную прямую

Интерактивный пример

Historically, this has been presented as a horizontal rule or line. While it may still be displayed as a horizontal rule in visual browsers, this element is now defined in semantic terms, rather than presentational terms, so if you wish to draw a horizontal line, you should do so using appropriate CSS.

Content categories Flow content.
Permitted content None, it is an empty element.
Tag omission It must have start tag, but must not have an end tag.
Permitted parents Any element that accepts flow content.
Implicit ARIA role separator
Permitted ARIA roles presentation or none
DOM interface HTMLHRElement

Attributes

This element's attributes include the global attributes.

align Устарело

Задаёт правило выравнивания.По умолчанию значение выставлено как left

color Не стандартно

Задаёт цвет линии

noshade Устарело

Sets the rule to have no shading.

size Устарело

Устанавливает высоту в px

width Устарело

Задаёт длину линии в px либо в %

Example

HTML

html
<p>
  Это первый параграф текста Это первый параграф текста Это первый параграф
  текста Это первый параграф текста
</p>

<hr />

<p>
  Это второй параграф текста Это второй параграф текста Это второй параграф
  текста Это второй параграф текста
</p>

Result

Спецификации

Specification
HTML
# the-hr-element

Совместимость с браузерами

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
hr
align
DeprecatedNon-standard
color
DeprecatedNon-standard
<hr> in <select>
noshade
DeprecatedNon-standard
size
DeprecatedNon-standard
width
DeprecatedNon-standard

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Non-standard. Check cross-browser support before using.
Deprecated. Not for use in new websites.

Смотрите также