0

in the following coding why the output is not aligned to centre?when i use <b> tag in the place of <h>, it is aligned..

<html> <head> <title>first page</title> </head> <body> <p align="center"><h1>This is a paragraph.</h1></p> <p>This is another paragraph. </p> </body> </html> why the output is not aligned to center?

2nd Aug 2017, 1:24 PM
neha thakur
neha thakur - avatar
2 Réponses
+ 14
<b> : inline <h> : block <style> h1,b{background:red;text-align:center;} </style> <b>centered but not full-width</b> <h1>centered</h1>
2nd Aug 2017, 1:26 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
thank you
2nd Aug 2017, 1:38 PM
neha thakur
neha thakur - avatar