HTML Elements and Attributes

Level : Beginner
Mentor: Shailendra Chauhan
Duration : 00:01:30

Heading Elements (h1-h6)

HTML provides six heading elements (h1 to h6) that define hierarchical headings. h1 is the highest level, and h6 is the lowest. They are used to structure and organize content based on its importance.

Example

<h1>Main Heading (h1)</h1>
<h2>Subheading (h2)</h2>
<p>Paragraph content...</p>

Line Break Element (br)

The line break element is used to create a line break within text content. It does not require a closing tag.

Example

<p>This is the first line.<br>This is the second line.</p>

Horizontal Rule Element (hr)

The horizontal rule element, <hr>, is used to create a thematic break or a horizontal line within the content. It is a self-closing tag.

Example

<hr>
<p>This section is now visually separated from the previous content.</p>
Self-paced Membership
  • 22+ Video Courses
  • 800+ Hands-On Labs
  • 400+ Quick Notes
  • 55+ Skill Tests
  • 45+ Interview Q&A Courses
  • 10+ Real-world Projects
  • Career Coaching Sessions
  • Email Support
Upto 60% OFF
Know More
Still have some questions? Let's discuss.
CONTACT US
Accept cookies & close this