Home  >  Article  >  Web Front-end  >  How to remove the dots in front of the unordered list in css

How to remove the dots in front of the unordered list in css

WBOY
WBOYOriginal
2021-12-13 10:38:1215903browse

In css, you can use the "list-style" attribute to remove the dot before the unordered list. This attribute is used to set the style of the list. When the value of the attribute is "none", the list will be removed. before the dot, the syntax is "ul{list-style:none;}".

How to remove the dots in front of the unordered list in css

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

How to remove the dot before the unordered list in css

In css, you can use the list-style attribute to remove the dot before the unordered list dot, this attribute is used to set the attribute style of the list. When the value of the attribute is none, you will remove the dot in front of the unordered list.

The example is as follows:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        ul li{
            list-style:none;
        }
    </style>
</head>
<body>
    <p>无序列表:</p>
<ul>
  <li>雪碧</li>
  <li>可乐</li>
  <li>凉茶</li>
</ul>
</body>
</html>

Output result:

How to remove the dots in front of the unordered list in css

If you are interested, you can continue to click on css video tutorial to learn .

The above is the detailed content of How to remove the dots in front of the unordered list in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn