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.
Поиск
Категории
Больше
Technology
Importance of Cyber Laws
Cyber laws, also known as internet laws or digital laws, are essential for regulating activities...
От ALAGAI AUGUSTEN 2024-07-16 17:07:21 0 9Кб
Computer Programming
HTML Table Headers: A Comprehensive Guide
HTML table headers are used to define the columns or rows of a table. They are typically styled...
От HTML PROGRAMMING LANGUAGE 2024-09-06 01:31:21 0 11Кб
Technology
Decision Support Systems (DSS)
Decision Support Systems (DSS) are computerized information systems designed to assist in...
От Business Information Systems (BIS) Course 2024-08-01 17:00:08 0 9Кб
Образование
Adapting to the Digital Age in Education
From Classrooms to Virtual Spaces: Adapting to the Digital Age in Education The landscape of...
От ALAGAI AUGUSTEN 2024-07-21 19:24:04 0 13Кб
Computer Programming
Functions, Parameters, and Return Values in python
Python uses functions extensively! Here's how functions, parameters, and return values work in...
Tebtalks https://forum.tebtalks.com