Home  >  Article  >  Web Front-end  >  How to remove dots from css ul tag

How to remove dots from css ul tag

青灯夜游
青灯夜游Original
2022-04-25 17:55:5312829browse

In CSS, the list-style-type attribute can be used to remove the dot mark of ul. The syntax is "ul{list-style-type:none}"; the list-style-type attribute can set list items The type of mark. When the value is "none", no mark can be defined or existing marks can be removed.

How to remove dots from css ul tag

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

HTML ul tag can be an unordered list, and each option in the list is defined using li tag.

HTML ul unordered list uses dots as option tags by default:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>HTML无序列表</title>
</head>
<body>
    <p>早餐的种类:</p>
    <ul>
        <li>鸡蛋</li>
        <li>牛奶</li>
        <li>面包</li>
        <li>生菜</li>
    </ul>
</body>
</html>

How to remove dots from css ul tag

So how to remove these dot tags? You can use css.

In CSS, you can use the list-style-type attribute to remove the dot marks from the unordered list.

The list-style-type attribute can set the type of list item tag. When the attribute value is set to "none", the tag can not be defined or the existing default tag can be removed.

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>HTML无序列表</title>
<style>
ul{
list-style-type:none;
}
</style>
</head>
<body>
    <p>早餐的种类:</p>
    <ul>
        <li>鸡蛋</li>
        <li>牛奶</li>
        <li>面包</li>
        <li>生菜</li>
    </ul>
</body>
</html>

How to remove dots from css ul tag

(Learning video sharing: css video tutorial, web front-end)

The above is the detailed content of How to remove dots from css ul tag. 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