0

When I open this HTML document in Chrome. The line that says "Line 2". How do I get it to align to the center too without starting a new paragraph tag.

<html>
<head>
<title>HTML page</title>
</head>
<body>
<h1 align=center> Heading </h1>
<hr width=50%>
<p align=center>Paragraph Line 1<br/> <hr width=25%> Line 2 </p>
<p align=center>New paragraph.</p>
</body>
</html>

1 Answers1

0

You can use the <DIV> tag to define a section by grouping the paragraphs as such:

 <html>
    <head>
      <title>HTML page</title>
    </head>
    <body>
     <h1 align=center> Heading </h1>
     <hr width=50%>
     <DIV align="center">
        <p>Paragraph Line 1 <hr width=25%> Line 2</p>
        <p>New paragraph.</p>
      </DIV>
    </body>
 </html>
bentek
  • 2,285