Text Content

HTML <hr> element

Indicates a thematic break between paragraphs or sections, rather than simply drawing a decorative line. It is a void element. The default line is only a presentation. Use CSS borders when a separator has no thematic meaning; a meaningful topic change can use hr with or without custom styling. It accepts global HTML attributes; individual global features may be inapplicable or restricted.

Formal Syntax & Structure

html syntaxhtml
<hr>

Return Value

HTMLHRElement

Content model: Empty; this void element cannot contain children and must not have an end tag. No closing tag.

Working Example

Example Snippethtml
<!doctype html><html lang="en">  <head>    <meta charset="utf-8">    <title>HTML example</title>  </head>  <body>    <p>Morning notes.</p>    <hr>    <p>Evening notes.</p>  </body></html>
HTML Reference