<hr>
hr Tag
The <hr>
element represents a thematic division in content, often signaling a shift in topic or a section break.
Syntax
<hr>
hr
Demo
This is some introductory content.
This is content for the new section.
<h1>Main Heading</h1>
<p>This is some introductory content.</p>
<hr>
<h2>Section Heading</h2>
<p>This is content for the new section.</p>
<hr>
tag creates a horizontal line to visually separate sections within a document.Attributes
This element supports global attributes.
align
Specifies the horizontal alignment of the rule. The default alignment is left.
color
Defines the rule's color using a color name or hexadecimal value.
noshade
Displays the rule without shading.
size
Sets the rule's height in pixels.
width
Specifies the rule's width in pixels or as a percentage.
Conclusion
The <hr>
tag is useful for visually dividing content and indicating thematic breaks. While it offers attributes for customization, modern web design favors CSS for greater styling flexibility. Using <hr>
helps structure content effectively, improving readability and presentation.
<hgroup>
The HTML <hgroup> element, now obsolete, was intended to combine several heading elements into a unified heading structure; current practices recommend using CSS or semantic HTML for this purpose.
<i>
The HTML <i> element styles text in italics, often used for emphasis or to highlight technical terms, without conveying any extra semantic significance.