0
Lists HTML
how do i centre the numbers in a list?
2 Respuestas
+ 1
The following example centres not only the list item text but also the numbers that are usually kept to the left even when text-align: center is used. I tested the example with Edge, Chrome, and Opera and it worked well in all of them.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
ol {
text-align: center;
list-style-position: inside;
}
</style>
</head>
<body>
<ol>
<li>Hello</li>
<li>Hello World</li>
</ol>
</body>
</html>
0
thank you!