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

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.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.