---
title: "Discussion on \"How to Add Horizontal Lines Before and After a Text in HTML\" | Hashnode"
description: "Discussion on \"How to Add Horizontal Lines Before and After a Text in HTML\". This article will guide you on how to add a horizontal line to the right and left side of a text as shown below:\n\nif(busy){\nJump to complete code!\n} else {\n1. Create an HTML text tag.\nIn your HTML file create an h2 tag and give it a class name of hr-..."
url: "https://hashnode.com/posts/how-to-add-horizontal-lines-before-and-after-a-text-in-html/621c9a3bc07e2ceec785e63b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Add Horizontal Lines Before and After a Text in HTML](https://unclebigbay.hashnode.dev/how-to-add-horizontal-lines-before-and-after-a-text-in-html?utm_source=hashnode&utm_medium=feed)

This article will guide you on how to add a horizontal line to the right and left side of a text as shown below: if(busy){ Jump to complete code! } else { 1. Create an HTML text tag. In your HTML file create an h2 tag and give it a class name of hr-...

Feb 28, 2022 · 3 min read · unclebigbay.hashnode.dev  
Updated Jan 8, 2024  
Read the article

-   [#html5](https://hashnode.com/tag/html5)
-   [#css](https://hashnode.com/tag/css)
-   [#design](https://hashnode.com/tag/design)

## Written by

[Ayodele Samuel Adebayo](https://hashnode.com/@unclebigbay)

@unclebigbay · Nigeria

  
[View profile](https://hashnode.com/@unclebigbay)

Software Engineer | Open-Source Contributor | Developer Educator

Software engineer and developer educator with over four years of experience building production-grade digital products for platforms serving millions of developers globally. Software engineer at Hashnode &amp; Bug0

## Responses 3

Markdown supported · ⌘↵ to post

[fore ddodge](https://hashnode.com/@fore)

[Jul 1, 2023](https://hashnode.com/posts/how-to-add-horizontal-lines-before-and-after-a-text-in-html/621c9a3bc07e2ceec785e63b/comment/64a01e618db091c4010333fb)

Great

[Austin Ugbaja](https://hashnode.com/@Austinugbaja)

[Dec 29, 2022](https://hashnode.com/posts/how-to-add-horizontal-lines-before-and-after-a-text-in-html/621c9a3bc07e2ceec785e63b/comment/63ada8a3be2c713764ff5eab)

Wow!!! I must say I've always had some sort of difficulty when it comes to implementing this. But this article will be of immense help.

Thanks for sharing this Bigbay 👍💯

[Oluwatobi Abidoye](https://hashnode.com/@KingSardius)

[Mar 2, 2022](https://hashnode.com/posts/how-to-add-horizontal-lines-before-and-after-a-text-in-html/621c9a3bc07e2ceec785e63b/comment/621f6693f1a32619afa39033)

A great writeup to learn from Buddy

[Ayodele Samuel Adebayo](https://hashnode.com/@unclebigbay)

[Mar 2, 2022](https://hashnode.com/posts/how-to-add-horizontal-lines-before-and-after-a-text-in-html/621c9a3bc07e2ceec785e63b/comment/621f6693f1a32619afa39033#reply-621fb1a5aa0b9716581fba97)

Glad it helps, thanks for reading.
