+ 1

If I want to make a list in the centre of webpage including the numbers. What would be the syntax?

I tried align="center" in between <li tags.> didn't work out!

29th Jul 2016, 2:03 PM
rishabh kaushal
rishabh kaushal - avatar
2 ответов
+ 3
use ur code b/w <centet> </center> tag
29th Jul 2016, 2:31 PM
Saurav S Shekhar
Saurav S Shekhar - avatar
+ 2
HTML list is a block element. It fills all available width. Centering it while it's taking up 100% width wont have any effect. First you have to give it a width of less than 100% then a style of 'margin: auto;'. Example: ol { width: 60%; margin: 0 auto; } In CSS that is.
29th Jul 2016, 11:00 PM
ZinC
ZinC - avatar