0

How to align a list to the center of a page in HTML?

8th Sep 2016, 8:08 PM
Naz
Naz - avatar
2 Réponses
+ 3
Put it inside a div and use align="center". <div align="center"> <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> </div>
8th Sep 2016, 8:13 PM
Zen
Zen - avatar
+ 1
You can use CSS for this. put margin: auto; <div id= "para"> <ul> <li>Kandy</li> <li>Galle</li> <li>Matara</li> </ul> </div> Put this code in CSS file. #para{ margin:auto; }
9th Sep 2016, 2:58 AM
Pasindu Jayaneth
Pasindu Jayaneth - avatar