HTML Horizontal Rules (<hr>)

0
5KB

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.
Search
Nach Verein filtern
Read More
Physics
COLLECTION OF PHYSICS SCENARIOS
COLLECTION OF PHYSICS SCENARIOS
Von Expedito 2024-08-13 19:19:44 0 7KB
Ausbildung
A MUST KNOW FOR S6 HISTORY STUDENTS
https://acrobat.adobe.com/id/urn:aaid:sc:EU:8ec647ff-c6ae-4844-831f-3f6e719e9bb0
Von Expedito 2024-07-15 19:59:30 0 7KB
Technology
Introduction to Information Systems in Business
Information Systems (IS) play a pivotal role in the operations and management of modern...
Von Business Information Systems (BIS) Course 2024-07-31 17:15:05 0 6KB
Computer Programming
HTML, Head, Body tags
HTML The root element of an HTML document. Encloses the entire document, including the head...
Von HTML PROGRAMMING LANGUAGE 2024-08-13 03:31:57 0 5KB
Technology
Ransomware Attacks
Ransomware is a type of malicious software (malware) that encrypts the victim’s files or...
Von Olaim 2024-07-13 08:52:05 0 6KB