HTML Horizontal Rules (<hr>)

0
8χλμ.

The <hr> tag represents a thematic break in a page, typically displayed as a horizontal rule. It separates content into distinct sections.

Basic Usage

HTML
<hr>

Example with Other Elements

HTML
<h1>Section 1</h1>
<p>Content for section 1.</p>

<hr>

<h1>Section 2</h1>
<p>Content for section 2.</p>

Attributes

While the <hr> tag doesn't have many attributes, here are the ones you might use:

  • width: Specifies the width of the rule.
  • size: Specifies the height of the rule.
  • align: Specifies the alignment of the rule (left, right, or center).
  • noshade: Specifies that the rule should not be shaded.

Note: The appearance of the <hr> element can be heavily customized using CSS.

Example with Attributes

HTML
<hr width="50%" size="5" align="center" noshade>

Important Points

  • Semantic meaning: The <hr> tag has a semantic meaning, indicating a thematic break.
  • Visual appearance: While traditionally displayed as a horizontal line, its appearance can vary based on user styles or browser settings.
  • Accessibility: The <hr> tag provides a visual cue for screen reader users, helping them understand the structure of the page.

When to Use <hr>

  • To separate content into distinct sections.
  • To indicate a change in topic or mood.
  • To visually break up long sections of text.
Αναζήτηση
Κατηγορίες
Διαβάζω περισσότερα
Computer Programming
Basic structure of an HTML document
An HTML document is composed of two main sections: the head and the body. The <head>...
από HTML PROGRAMMING LANGUAGE 2024-08-13 03:25:34 0 9χλμ.
Εκπαίδευση
Timeline 1875-1890
1875 A Senate commission meeting with Red Cloud and other Lakota chiefs to negotiate legal...
από Modern American History 2024-08-02 16:29:08 0 11χλμ.
Εκπαίδευση
Unlock Your Potential with Lifelong Learning
In today’s fast-paced, ever-changing world, the concept of lifelong learning has become...
από ALAGAI AUGUSTEN 2024-07-21 19:03:27 0 14χλμ.
Technology
SUMIFS Function
The SUMIFS function in Excel is used to sum a range of values based on multiple criteria. It's...
από Microsoft Excel Tips 2024-10-16 01:05:32 0 16χλμ.
Technology
MICROSOFT WORD 2016: STEP-BY-STEP GUIDE
MICROSOFT WORD 2016: STEP-BY-STEP GUIDE
από Mpatswe Francis 2024-08-14 21:37:42 0 9χλμ.
Talksphare https://talksphare.com