Bootstrap Dividers

Reading time

3

Writer

David Johnson

Published date

Mar 16, 2025

Mar 16, 2025

Category

Web design

Web design

Having well-structured content on your website helps visitors to find specific information that they need. In today's snippet tutorial, we'll explore the ways how to divide text sections with <hr> dividers. 

Bootstrap Dividers are horizontal lines to create sections on various parts of your website. I have created multiple variants - solid lines, dashed lines, dotted lines, and even a text in the divider.

The Bootstrap Divider is created based on the <hr> element. Each divider is created using HTML and CSS3. You can also add custom text between the divider to create a header for each of your content sections.

I have originally created the tutorial in Bootstrap 4, but it should be fully compatible with Bootstrap 5. 

Alright, let's do it.

FAQs

What is the <hr>?

The <hr> element is a horizontal rule, which can be used to separate content.

The <hr> element is always displayed as a single line.

The width of the <hr> element is determined automatically by the browser; based on the width of its contents.

When to Use Horizontal Dividers

The <hr> element should be styled consistently with other horizontal rules in the same document when used as a separator. The hr element can also be used to mark up a thematically distinct sub-section of the document, such as a chapter title or other top-level heading in printed works.

The <hr> element should not be used for visual styling. In particular, do not insert an <hr> element between paragraphs in an attempt to force line breaks; use CSS instead if you want to control paragraph spacing and margin size.

Is the <hr> tag still used in HTML?

Yes. The <hr> tag was created in HTML 3.2 and has been supported by all browsers since then.

If you liked this snippet, you might also enjoy exploring Bootstrap Chat or Bootstrap DataTables .

Popular Templates

Meticulously crafted by pro designers and developers, so you get top-tier UI/UX and launch-ready functionality from the get-go.

Subscribe to our newsletter and get our latest template for free!

Join over 100,000 designers and engineers already subscribed—exclusive offer for new Template Sherpa accounts!

Subscribe to our newsletter and get our latest template for free!

Join over 100,000 designers and engineers already subscribed—exclusive offer for new Template Sherpa accounts!

Subscribe to our newsletter and get our latest template for free!

Join over 100,000 designers and engineers already subscribed—exclusive offer for new Template Sherpa accounts!