How to make a line under your text?

Hi all. Advise how better to solve the problem. There is text on the right and left and black line. You need to make the text without any background, it overlaps the black line in place of its size.
https://jsfiddle.net/sropwj1p/
August 19th 19 at 23:33
1 answer
August 19th 19 at 23:35
.bg-line {
 float: left;
 width: 80%;
 height: 1px;
 background-color: #000;
 position: absolute;
 top: 9px;
left:10%;
text-align:center;
}

So?

Or:
.bg-line {
}
.bg-line:after{content: "";position: absolute;height:2px;background: #000000;top: 9px;width:80%;left:10%;}

Find more questions by tags CSSHTML