Border alignment

Can anyone tell me how to align borders left and right and text in middle?

Have a look at this,

https://www.w3schools.com/css/css_border.asp

thank you Sujith, but i already tried this it gives me vertical line and i want horizontal.

You can use ::before and ::after the text, if you could provide a codepen or jsfiddle to your project it would be easy

You can refer this,

https://jsfiddle.net/Sujith_S/z5ay7jen/27/

thank you Sujith it helped me. Thank you man