How To Create An Unordered List Without Bullets - W3docs
Có thể bạn quan tâm
The <ul> tag is used for specifying items without numerical order. The items of such list are commonly displayed with a bullet. However, it is possible to have an unordered list without any bullets. How to do this? Well, in this snippet, we’re going to show how to remove the bullets with the help of the CSS list-style-type property used for the parent element.
Create HTML
- Use <h1> and <p> elements.
- Use <ul> tag to create an unordered list.
- Add <li> elements inside the <ul> tag.
Add CSS
- Set the list-style-type property to “none” for the <ul> element.
Now, you can see the result of our code.
Example of creating an unordered list without bullets:
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> ul { list-style-type: none; } </style> </head> <body> <h1>W3Docs</h1> <p>Our books:</p> <ul> <li>Learn HTML</li> <li>Learn CSS</li> <li>Learn Javascript</li> <li>Learn Git</li> </ul> </body> </html> Try it Yourself »Result
Our books:
- Learn HTML
- Learn CSS
- Learn Javascript
- Learn Git
If you want to remove the indentation as well, use the padding and margin properties set to 0.
In our next example, you can see two unordered lists, one of them with bullets, and the other without any bullet and indentation.
Example of creating an unordered list without bullets and indentation:
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> ul.no-bullets { list-style-type: none; margin: 0; padding: 0; } </style> </head> <body> <h3>W3Docs</h3> <p>Our books (with bullets):</p> <ul> <li>Learn HTML</li> <li>Learn CSS</li> <li>Learn Javascript</li> <li>Learn Git</li> </ul> <p>Our books: (without bullets)</p> <ul class="no-bullets"> <li>Learn HTML</li> <li>Learn CSS</li> <li>Learn Javascript</li> <li>Learn Git</li> </ul> </body> </html> Try it Yourself »Từ khóa » Html List Without Bullet Point
-
How To Create A Bullet List With No Bullets In HTML - Computer Hope
-
How To Create An Unordered List Without Bullets - W3Schools
-
An Unordered List Without Bullets - Tryit Editor V3.7
-
How To Create An Unordered List Without Bullets In HTML?
-
How To Create An HTML List Without Bullets - Nathan Sebhastian
-
How To Make An HTML List Without Bullets - The Programming Expert
-
I Need An Unordered List Without Any Bullets - Stack Overflow
-
Html List Without Bullets Code Example - Code Grepper
-
How To Create An Unordered List Without Any Bullets In HTML
-
Learn About CSS List Style: Learn To Remove Bullets From Ul
-
The Ultimate Guide To Bullet Points In HTML Email - Litmus
-
Styling Lists - Learn Web Development | MDN
-
HTML Bullet Points – How To Create An Unordered List With The
-
Lists Without Bullets Or Numbers