in Technology by
How to remove bullet points in CSS?

1 Answer

0 votes
by

In some cases, we are required to remove the bullets of unordered and ordered lists. The removal of the list bullets is not a complex task using CSS. It can be easily done by setting the CSS list-style or list-style-type property to none.

The list-style-type CSS property is used to set the marker (like a disc, character, or the custom counter style) of a list item element. This CSS property helps us to create the list without bullets. It can only be applied to those elements whose display value is set to list-item. The list-style-type property is inherited, so it can be applied to the parent element (like <ul> or <ol>) to make it apply to all list items.

By default, the ordered list items are numbered with Arabic numerals (1, 2, 3, etc.), and the items in an unordered list are marked with round bullets (•). The list-style-type CSS property allows us to change the default list type of marker to any other type such as square, circle, roman numerals, Latin letters, and many more.

If we set its value to none, it will remove the markers/bullets. Instead of removing the bullets in a list, we can replace them with the images. It makes the site visually more attractive. It can be done by using the list-style-image property.

Let's understand how to remove bullet points by using an example.

Example

In this example, we are using both ordered and unordered lists and applying the list-style-type property with the value none to remove the bullet points of the list items.

  1. <!DOCTYPE html>  
  2. <html>  
  3. <head>  
  4. <style>  
  5. ol {  
  6. list-style-type: none;  
  7. font-weight: bold;  
  8. font-size: 20px;  
  9. }  
  10. ul {  
  11. list-style-type: none;  
  12. font-weight: bold;  
  13. font-size: 20px;  
  14. }  
  15. </style>  
  16. </head>  
  17. <body>  
  18. <h2>Ordered list</h2>  
  19. <ol>  
  20. <li>List Item 1</li>  
  21. <li>List Item 2</li>  
  22. <li>List Item 3</li>  
  23. </ol>  
  24. <h2>Unordered list</h2>  
  25. <ul>  
  26. <li>List Item 1</li>  
  27. <li>List Item 2</li>  
  28. <li>List Item 3</li>  
  29. </ul>  
  30. </body>  
  31. </html>  

Related questions

0 votes
    I'm unable to change/remove the link underline and color of the nested text. I checked the debug ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 12, 2022 in Education by JackTerrance
0 votes
    I hope I can keep this brief. The basic jist of my issue stems from SASS imports. I have an App ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I hope I can keep this brief. The basic jist of my issue stems from SASS imports. I have an App ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    Define Bullet graph in Tableau?...
asked Nov 1, 2020 in Technology by JackTerrance
0 votes
    what a list indents each item in the list and adds a bullet against each item what's attribute of tag puts the ... answer It is urgent Select the correct answer from above options...
asked Dec 11, 2021 in Education by JackTerrance
0 votes
0 votes
0 votes
0 votes
    I want to right align alternate list elements and keep the other left making it a ZIG-ZAG list Something ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I have loaded a css file on server so I am having a URL with me. How can i load it in ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 5, 2022 in Education by JackTerrance
0 votes
    I want to display the label of an input inside its input, so that when I click the input, the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 3, 2022 in Education by JackTerrance
0 votes
    I've successfully floated labels above form input fields when focused, but I'm stumped on how to keep ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 1, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: Simulating transform-origin using translate (2 answers) Closed 3 years ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: Simulating transform-origin using translate (2 answers) Closed 3 years ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 24, 2022 in Education by JackTerrance
0 votes
    I want to build my js/css code, write it on disk and serve it using webpack-dev-server in a ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
...