
Cuando abro este documento HTML en Chrome. La línea que dice "Línea 2". ¿Cómo puedo hacer para que se alinee también con el centro sin iniciar una nueva etiqueta de párrafo?
<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>
Respuesta1
Puede utilizar la <DIV>
etiqueta para definir una sección agrupando los párrafos como tal:
<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>