HTML Horizontal Rules (<hr>)

0
5χλμ.

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.
Αναζήτηση
Κατηγορίες
Διαβάζω περισσότερα
Εκπαίδευση
Chinese Exclusion
από Modern American History 2024-08-02 16:41:02 0 6χλμ.
Εκπαίδευση
UACE WAKISSHA FOODS AND NUTRITION 2024
UACE WAKISSHA FOODS AND NUTRITION 2024
από Expedito 2024-08-10 10:19:35 0 5χλμ.
Computer Programming
String Methods
String split() and join() It’s a common programming task is to take a large string and...
από Python for Everybody - Full University Python Course Code 2024-07-17 15:00:16 0 7χλμ.
Physics
SEPTA-O-LEVEL PHYSICS SEMINAR SLATED FOR 23RD JUNE 2024 AT ST. JOSEPH OF NAZARETH HIGH SCHOOL KAVULE-KATENDE
https://acrobat.adobe.com/id/urn:aaid:sc:EU:39c1aa82-237a-43bf-ba1a-fbe5223d26f1
από Question Bank 2024-07-14 19:52:41 2 8χλμ.
Εκπαίδευση
Unlock Your Potential with Lifelong Learning
In today’s fast-paced, ever-changing world, the concept of lifelong learning has become...
από Olaim 2024-07-21 19:03:27 0 7χλμ.