Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I need an unordered list without any bullets

Tags:

html

css

I have created an unordered list. I feel the bullets in the unordered list are bothersome, so I want to remove them.

Is it possible to have a list without bullets?

like image 509
praveenjayapal Avatar asked Jun 22 '09 13:06

praveenjayapal


People also ask

How do you make an unordered list without bullets?

Adding the "list-style: none" CSS class to the unordered list (<ul>) or ordered list (<ol>) tag removes any bullet or number.

How do I remove bullets from a list in HTML?

To remove the HTML list bullets, set the "list-style-type" to "none".

How do you remove bullets from a list?

Making CSS Remove Bullets It is possible to remove bullets from ul lists by setting the CSS list-style-type property to none . As a result, the bullets disappear from the list. Note: to get rid of the automatic indentation, you can also set margin and padding to 0.

How do I make an unordered list?

You create an unordered list using the ul tag. Then, you use the li tag to list each and every one of the items you want your list to include. tag. This means that the li tag is the child of the ul tag.


2 Answers

You can remove bullets by setting the list-style-type to none on the CSS for the parent element (typically a <ul>), for example:

ul {   list-style-type: none; } 

You might also want to add padding: 0 and margin: 0 to that if you want to remove indentation as well.

See Listutorial for a great walkthrough of list formatting techniques.

like image 80
Paul Dixon Avatar answered Dec 08 '22 13:12

Paul Dixon


If you're using Bootstrap, it has an "unstyled" class:

Remove the default list-style and left padding on list items (immediate children only).

Bootstrap 2:

<ul class="unstyled">    <li>...</li> </ul> 

http://twitter.github.io/bootstrap/base-css.html#typography

Bootstrap 3 and 4:

<ul class="list-unstyled">    <li>...</li> </ul> 

Bootstrap 3: http://getbootstrap.com/css/#type-lists

Bootstrap 4: https://getbootstrap.com/docs/4.3/content/typography/#unstyled

Bootstrap 5: https://getbootstrap.com/docs/5.0/content/typography/#unstyled

like image 32
Scott Stafford Avatar answered Dec 08 '22 11:12

Scott Stafford