Open In App
Related Articles

How to remove indentation from an unordered list item using CSS?

Improve Article
Save Article
Like Article

While designing web pages we used to add some list of items sometimes they are numbered (in various style) and sometimes they are bulleted (in various style). It might happen when we are trying to design a navigation bar or any kind list in which items are neither numbered nor bulleted we don’t need numbers or bullets and also no margin. To remove that indentation from an unordered list (a list having bullets) there needs styling to be done using CSS. The style will be implemented only on the list. So the selector would be ul.


ul {
    // CSS Property

Example: This example creates a page with a list with zero(0) indent .

<!DOCTYPE html>
        Remove indentation from an 
        unordered list of items
    <!-- CSS style to remove indentation
    from list of items -->
        ul {
    <h3>Computer science subjects:</h3>
        <li>Data Structure</li>
        <li>Operating System</li>
        <li>Computer Network</li>
        <li>Web Technology</li>


In the above example, padding-left property is used to set the indentation from left. The padding-left:0 is used to remove indentation (space) from left. The list-style: none property is used to remove list-style property from the list of items.

Last Updated : 22 Apr, 2019
Like Article
Save Article
Similar Reads
Related Tutorials