search
HomeWeb Front-endHTML TutorialList tags supported by html: unordered list, ordered list and definition list (introduction)

In a sense, anything that is not descriptive text can be considered a list. For example: the census, the solar system, the family tree, the tour menu, or even all your friends can be represented as a list or a list within a list. So what are the html list styles? This chapter brings you the list tags supported by html: unordered list, ordered list and custom list (introduction). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

1. html unordered list

The unordered list is a list of items in no order. Use ●□◇ in front of each column. ◆ and other symbols are used to indicate distinction.

htmlUnordered list starts with

    tag. Each list item starts with
  • ; the type attribute of the unordered list has three optional values. These three options are: disc solid garden, circle hollow garden, and square small square. The default attribute is disc solid garden.

    Basic syntax:

    <ul>
        <li type="value"> 项目1</li>
        <li type="value"> 项目2</li>
        <li type="value"> 项目3</li>
    </ul>

    The value is the bullet type (type type). The type type of the unordered list is:

    List tags supported by html: unordered list, ordered list and definition list (introduction)

    html unordered list code example:

    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="UTF-8">
    		<title>html---无序列表</title>
    	</head>
    	<body>
    		<ul>
    			<li>默认的无序列表</li>
    			<li>默认的无序列表</li>
    			<li>默认的无序列表</li>
    		</ul>
    		<ul>
    			<li type="circle">添加circle属性</li>
    			<li type="circle">添加circle属性</li>
    			<li type="circle">添加circle属性</li>
    		</ul>
    		<ul>
    			<li type="square">添加square属性</li>
    			<li type="square">添加square属性</li>
    			<li type="square">添加square属性</li>
    		</ul>
    	</body>
    </html>

    Rendering:

    List tags supported by html: unordered list, ordered list and definition list (introduction)

    You can also use the css list-style-type attribute to define The html unordered list style of the picture above.

    2. html ordered list

    An ordered list is a list of items arranged in alphabetical or numerical order. Pay attention to ordered lists. The result is a sequential number. If a list item is inserted or deleted, the number will be automatically adjusted.

    htmlOrdered list starts with

      tag. Each list item begins with a
    1. tag.

      Basic syntax:

      <ol type="value1" start="value2">
          <li>项目1</li>
          <li>项目2</li>
          <li>项目3</li>
      </ol>

      value1 represents the type of bullet in the ordered list (type type), value2 represents the value at the beginning of the item. start is the number at the beginning of the number, such as start=2, then the number Starting from 2, if starting from 1, you can omit it, or set value="n" in the

    2. tag to change the specific number of the list line item, such as
    3. . type=The type of numbers, letters, etc. used for numbering. For example, type=a, then English letters are used for numbering. To use these attributes, place them in the initial tag of
        or
      1. .

        Ordered list type types are:

        List tags supported by html: unordered list, ordered list and definition list (introduction)

        html ordered list code example:

        <!DOCTYPE html>
        <html>
        	<head>
        		<meta charset="UTF-8">
        		<title>html---有序列表</title>
        	</head>
        	<body>
        		<ol>
                <li>默认的有序列表</li>
                <li>默认的有序列表</li>
                <li>默认的有序列表</li>
            </ol>
            <ol  type="a" start="2">
                <li>第1项</li>
                <li>第2项</li>
                <li>第3项</li>
                <li value="20">第4项</li>
            </ol>
            <ol  type="I" start="2">
                <li>第1项</li>
                <li>第2项</li>
                <li>第3项</li>
            </ol>
        	</body>
        </html>

        Rendering:

        List tags supported by html: unordered list, ordered list and definition list (introduction)

        You can also use the css list-style-type attribute to define the html ordered list style in the above picture.

        3. html custom list

        The custom list is not just a list of items, but a combination of items and their comments.

        htmlCustom lists start with a

        tag. Each custom list item begins with
        . The definition of each custom list item begins with
        . Used to explain and describe terms or nouns. There are no bullets in front of the list items of the custom list.

        Basic syntax:

        <dl>
        <dt>名词1</dt>
        <dd>名词1解释1</dd>
        <dd>名词1解释2</dd>
        
        <dt>名词2</dt>
        <dd>名词2解释1</dd>
        <dd>名词2解释2</dd>
        </dl>

        html Custom list code example:

        <!DOCTYPE html>
        <html>
        	<head>
        		<meta charset="UTF-8">
        		<title>html---有序列表</title>
        	</head>
        	<body>
        		<dl>
        		   <dt>计算机</dt>
        		   <dd>用来计算的仪器 ... ...</dd>
        		   <dt>显示器</dt>
        		   <dd>以视觉方式显示信息的装置 ... ...</dd>
        		</dl>
        	</body>
        </html>

        Rendering:

        List tags supported by html: unordered list, ordered list and definition list (introduction)

        4. A brief introduction to the css list-style-type attribute

        The list-style-type attribute sets the type of list item tag.

        Possible values ​​are:

        List tags supported by html: unordered list, ordered list and definition list (introduction)

The above is the detailed content of List tags supported by html: unordered list, ordered list and definition list (introduction). 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
The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.