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.
البحث
الأقسام
إقرأ المزيد
Technology
Digital Divide
The digital divide refers to the gap between individuals, households, businesses, and geographic...
بواسطة Olaim 2024-07-16 16:59:32 0 5كيلو بايت
Technology
Understanding the ROUND Function
The ROUND function in Excel is used to round a number to a specified number of decimal places....
بواسطة Microsoft Excel 2024-09-03 03:30:30 0 6كيلو بايت
Technology
Components of BIS: Hardware, Software, Data, People, Processes
Business Information Systems (BIS) are composed of several key components that work together to...
بواسطة Business Information Systems (BIS) Course 2024-07-31 18:24:21 0 6كيلو بايت
أخرى
Israeli Defense Minister Cancels Visit with Pentagon Chief Amid Rising Tensions
Tel Aviv, October 9, 2024 – In a significant development, Israeli Defense Minister...
بواسطة Updates & History 2024-10-09 17:53:53 0 8كيلو بايت
Technology
Understanding the IF Function
step-by-step guide on using the IF function in Excel, incorporating best practices and addressing...
بواسطة Microsoft Excel 2024-09-03 03:12:25 0 5كيلو بايت