My Development Notes


Remove Bullet Points and Underline – CSS


You can easily remove bullets from unordered or ordered lists and underlines from anchor tags in HTML using certain CSS rules.

Example

Let’s see how to achieve this with an example :

<nav>
    <ul>
        <li><a href="#">Link 1</a></li>
        <li><a href="#">Link 2</a></li>
        <li><a href="#">Link 3</a></li> 
    </ul>
</nav>

In the above code snippet, we’ve three links inside of anchor tags. By default you’ll have underlines beneath them and bullet points before each item.

To remove these we use the below CSS codes :

ul {
    list-style-type: none;
    /* this removes bullets */
    
}

a {
    text-decoration: none;
    /* this removes underline */
}

Leave a Reply

Your email address will not be published. Required fields are marked *