HTML Horizontal Line Tag

 

4. Horizontal Line Tag (<hr>)

The <hr> tag creates a horizontal line to visually separate content. It indicates a thematic break.

Attributes:

  • width: Specifies the width of the line (e.g., in pixels or percentage).
  • size: Specifies the thickness of the line.
  • color (deprecated): Specifies the color of the line.
  • align (deprecated): Aligns the line (left, center, or right).
Example:
<hr width="50%" size="3" color="blue">
<p>This content is separated by a horizontal line.</p>

Explanation:

  • width="50%": Sets the line width to 50% of the container.
  • size="3": Sets the thickness of the line.
  • color="blue": Colors the line blue (deprecated, use CSS instead).

Comments

Popular posts from this blog

Introduction to Computer

History of Computer

Computer Generation