Hi, pls I need urgent help with this. I need to put a horizontal line before and after the about us h1
tag. I’ve tried using the ::before
and ::after
pseudo elements but it ain’t working. Pls anything else I can try?
Depending on what you want to achieve, alternatives are:
CSS
h1 {
border-bottom: 1px solid black;
border-top: 1px solid black;
}
HTML
<hr>
<h1>My Title</h1>
<hr>
Use <hr>
element before and after <h1>
.
Code
<hr>
<h1> Hello World </h1>
<hr>
Output