Home >Web Front-end >HTML Tutorial >How to clear li black spots in html
Methods to clear li black spots: 1. Use the list-style-type attribute, just add the "list-style-type:none;" style to the li element; 2. Use the list-style attribute , just add the "list-style:none;" style to the li element.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
Use ul and li tags in HTML to create a list:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <ul> <li>列表1</li> <li>列表2</li> <li>列表3</li> </ul> </body> </html>
It is found that each item in the list has a small black dot by default:
How to remove the black spots on the front of your chest?
Use the list-style-type attribute, which sets the type of list item tag. When the attribute value is "none", no tag is specified (that is, the tag is removed).
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style type="text/css"> ul li{ list-style-type:none; } </style> </head> <body> <ul> <li>列表1</li> <li>列表2</li> <li>列表3</li> </ul> </body> </html>
You can also use the list-style shorthand attribute, which can set all list attributes in one statement.
ul li{ list-style:none; }
Related recommendations: "html video tutorial"
The above is the detailed content of How to clear li black spots in html. For more information, please follow other related articles on the PHP Chinese website!