Home  >  Article  >  Web Front-end  >  How to remove the dot from ul tag in HTML? Style example analysis of HTML unordered list

How to remove the dot from ul tag in HTML? Style example analysis of HTML unordered list

寻∝梦
寻∝梦Original
2018-08-31 13:35:0840376browse

This article mainly talks about canceling the default dots of the ul tag in HTML, and also about the style explanation of the unordered list ul tag in HTML, and gives the ul tag. Introduction to the three values ​​of the type attribute. Now let us read this article together

First of all, at the beginning of this article we will introduce how to remove the dots of the ul tag in HTML:

Everyone should have used the ul unordered list tag. There are many uses of the ul tag. Many times we can use dots instead, which feels good. But sometimes it doesn't feel very useful to replace it with a dot. At this time, we usually think about how to remove the dot, or change it to another style. Today's article mainly talks about how to remove that point. Later we will also talk about changing it to other styles for display. (If you want to see more, come to the PHP Chinese website, There are courses about HTML learning here)

Now let’s talk about how to remove the dots. Let’s use a complete code example to demonstrate ul Tag:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>PHP中文网</title>
</head>
<body>
<ul>
  <li>php中文网</li>
  <li>百度百科</li>
  <li>腾讯课堂</li>
</ul>
</body>
</html>

This is a basic ul unordered list application. The display effect is as shown in the following picture:

How to remove the dot from ul tag in HTML? Style example analysis of HTML unordered list

There are all in this picture It is a custom small dot. In many cases, it is okay to use small dots, but what if we want to remove the small dots? Let’s see how I achieved it.

Give me another demonstration of the entire ul tag code:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>PHP中文网</title>
<style type=""text/css>
ul{
list-style: none;
}
</style>
</head>
<body>
<ul>
  <li>php中文网</li>
  <li>百度百科</li>
  <li>腾讯课堂</li>
</ul>
</body>
</html>

Compared with the previous code, this code only adds a css style file, using a little css style, you can change the style of the ul unordered list. Although some people don't know CSS styles, they just need to remember such a simple style. Knowing how to write it can eliminate the default point of the ul tag.

The rendering of this is as follows:

How to remove the dot from ul tag in HTML? Style example analysis of HTML unordered list

Is it true that there are no small dots? Such labels can be applied to many occasions, such as navigation For applications such as strips, the small dots have to be removed.

2. Now let’s talk about how to change the ul tag into other styles, for example, small dots into square shapes. Let us continue to look at

Here we are talking about the type attribute of the ul tag. This attribute can also be used in the ordered list ol tag, but the value of the attribute is different. Now let’s take a look at the application of type tags in ul tags:

There is also an example of ul tags:

<ul type="square">
  <li>php中文网</li>
  <li>百度百科</li>
  <li>腾讯课堂</li>
</ul>

type="square" in the above picture What does it mean? Let’s take a look at the renderings:

How to remove the dot from ul tag in HTML? Style example analysis of HTML unordered list

Look at the picture above. It’s a bit small, but it’s obvious that it has changed from the original small dots to the current square black ones. Clicked. This is one of the styles. There is also another attribute value:

type=”circle”. The meaning of this is also easy to understand. Let’s take a look at the rendering first:

How to remove the dot from ul tag in HTML? Style example analysis of HTML unordered list

As shown in the picture above, they have now become hollow circles. These are three styles composed of HTML ul tags and attributes (there is also a style that changes the small dots back, using is type="

disc") Many people have begun to use css style sheets to set styles for tags, but there are still many people who like to use pure html tags to implement styles. For example, the editor and I have been I use HTML tag styles and rarely use CSS styles. Sometimes I use CSS styles instead when the tag styles are not easy to use.

Okay, that’s all the content of this article about ul tags (if you want to learn more, come to PHP中文网, a website for learning programming). If you have any questions, you can leave a message below. .

【Editor’s Recommendation】

What are the three elements of the meta tag in html5? Summary of the use of meta tags

#html How to create the select drop-down box style? Detailed explanation of html select style

The above is the detailed content of How to remove the dot from ul tag in HTML? Style example analysis of HTML unordered list. 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