Open In App

How To Align List in Centre Using only HTML

Last Updated : 07 Jun, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Centering a list on a webpage is a common design need. Usually, this is done using CSS, but sometimes you might want to center a list using only HTML without any CSS. Using HTML, we will show you easy ways to align a list in the center.

Centering a List Item

Here, we are centering a list of items, not a list. Below are some methods:

Method 1: Using the <center> Tag

We can wrap our content around the center tag, which centers our unordered list.

HTML
<!DOCTYPE html>
<html>

<head>
    <title>Page Title</title>
</head>

<body>
    <center>
        <ul>
            <li>Item 1</li>
            <li>Item 2</li>
            <li>Item 3</li>
        </ul>
    </center>
</body>

</html>


Note: We can also use the <center> tag inside each list item to center the particular list item, but this method is not common and can make the HTML messy.

Method 2: Add align="center" to a container

As <center> tag was decrepicated in HTML 5, so we can use align attribute to make out ordered list center. To do this, first we need to make sure our list wrap into a container and we set align = center in that div/container as example below.

HTML
<!DOCTYPE html>
<html>

<head>
    <title>Page Title</title>
</head>

<body>
    <div align="center">
        <ol>
            <li>Item 1</li>
            <li>Item 2</li>
            <li>Item 3</li>
        </ol>
    </div>
</body>

</html>


Centering a List Within a Container (Recommended)

list

To Center a Whole List, there is not direct method in HTML, we need to use CSS to do so. Here, you can check this article on center a list using css.


Next Article
Article Tags :

Similar Reads