There are many ways to get what you want. Beside the previous answers, you can use something like the following:
1. In your .xhtml file
Code:
<h1>Title 1</h1>
<p class="border1"> </p>
<h1>Title 2</h1>
<p class="border2"> </p>
2. In your .css stylesheet
Code:
h1 {
text-align: center;
margin: 1em 0 0;
}
.border1 {
height: 2px;
border-top: 2px solid black;
border-bottom: 2px solid black;
margin: 0 25% 1em;
width: 50%;
}
.border2 {
height: 2px;
background: black;
margin: 0 25% 1em;
width: 50%;
}
Here you can watch how it looks in Sigil:
Of course, you can change everything in the "border1" and "border2" classes (top margin, bottom margin, height (thickness of the line), background color, type of borders, border color, width of the lines, etc., etc.)
Regards
Rubén