0
why other half of paragraph not aligned center?
I mean if I remove <hr /> element/tag, the full paragraph stays aligned center with br in it. but with hr, it seems like it's closing an invisible p tag before hr and starting one after it?
4 ответов
0
And your code is?
0
<html>
<head>
<title>Attributes</title>
</head>
<body>
<p align="center">This is a text <br />
<hr width="10%" align="right" /> This is also a text.
</p>
</body>
</html>
This one
0
You have to use css instead. 'align' is not supported in html5. <hr> has also another meaning in html5 than a rule.
Give your <p> a border-bottom:
<p style="border-bottom:1px solid #000;">text</p>
Use padding to control how close to your paragraph you want the line to be.
0
Oh yes, I forgot.. hr is a block-level element. Meaning it will force a linebreak and can't be put inside another block-level element, such as <p>, without breaking it.