0
Help please?
Ok so this is my css body { background-color: #09a7a1; } h1 { font-family: fantasy; text-align: center; color: white; } div { color: #09a7a1; background-color: white; text-align: center; font-family: align; height: 200px; width: 200px; } The html <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>heading</h1> <div> <p>*text goes here*</p> <p>*another text goes here</p> </div> </body> </html> I want the div (box) to be aligned to the center. Help?
1 Answer
+ 2
Just add
margin: 10px auto;
in div selector.
Advisable not to use center tag, this tag is obsoleted since HTML4. Why we still use it on HTML5?
New browsers might not support center tag.



