0

how do i make my headings or text be centered?

10th Feb 2017, 11:40 PM
njabulo
njabulo - avatar
1 Réponse
+ 1
<html> <head> <title>Page Title</title> <style> h1 { text-align: center; } p { text-align: center; } section { width: 100px; height: 100px; background-color: green; margin: 10 auto; } </style> </head> <body> <h1>Centered Heading</h1> <p>Centered Paragraph</p> <section><p>Horizontally Centered Div</p></section> </body> </html>
11th Feb 2017, 1:35 AM
ChaoticDawg
ChaoticDawg - avatar