You can use HR tag or HR tag with simple css code
HTML HR tag:
<center>Your Code Here</center> <hr align="center" width="50%">
Here is an HR tag with simple css code:
hr { width: 50%; margin-left: auto; margin-right: auto; }
<center>Your sample code here</center> <hr>
Note: Attributes that are not supported in the HTML5 specification are related to the appearance of the tag. Appearance should be set in CSS, and not in the HTML itself.
So, use the <hr> with no attributes, then create it in CSS to make it look the way you want.
source share