Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What list modes are provided by HTML

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the knowledge of "what list modes are provided by HTML". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

HTML provides three list modes: 1, ordered list, created using "" and "" tags, the contents of the ordered list are in order; 2, unordered list, created using "" and "" tags; 3, define lists, created using "", "" and "" tags.

The operating environment of this tutorial: windows7 system, HTML5 version, Dell G3 computer.

HTML lists (List) can put together several pieces of related content to make the content look more organized. You can place text, images, links, and so on within a list, or you can define another list (list nesting) in one list.

HTML provides us with three different forms of lists:

Ordered list, using the + tag

Unordered list, using the + tag

Define the list, using the + tag

1. Ordered list

In HTML, tags are used to represent ordered lists. There is a sequence of contents between ordered lists, such as a series of steps in a recipe that need to be completed sequentially, and an ordered list can be used.

Let's look at a simple example:

HTML ordered list

Steps for cooking rice:

Boil the water and add a spoonful of rice to stir well and continue to cook for 10 minutes

Ordered lists need to be used and labeled:

Is the abbreviation of order list, which represents an ordered list. It can number each item in the list, starting with the number 1 by default.

It is an abbreviation for list item, indicating that each item in the list, as many as there are, indicates how many items there are. List items can contain text, pictures, links, and so on, or even another list.

Note that when used in general and in conjunction, it does not appear alone, and it is not recommended to use tags other than directly in.

two。 Unordered list

HTML uses tags to represent unordered lists. Unordered lists, like ordered lists, use tags to represent each item of the list, but there is no order between the contents of the unordered list. For example, an unordered list can be used when the type of breakfast does not need to indicate the order.

Let's look at a simple example:

Copy plain text copy HTML unordered list

Types of breakfast:

Eggs, milk, bread, lettuce HTML unordered list

Types of breakfast:

Eggs, milk, bread, lettuce

The running result of the browser is shown in the figure:

Unordered lists need to be used and labeled:

It is short for unordered list and stands for unordered list.

As in, represents each item in the list. By default, each item in an unordered list is represented by a ● symbol.

Note that when used in general and in conjunction, it does not appear alone, and it is not recommended to use tags other than directly in.

3. Definition list

In HTML, tags are used to create a list of definitions. The definition list consists of two parts: title (terminology) and description. Description is the explanation and description of the title, and the title is the summary and refinement of the description.

The specific syntax format of the definition list is as follows:

Title 1 description text 2 title 2 description text 2 title 3 description text 3

Defining a list requires the use of, and tags:

Is an abbreviation for definition list, which represents a list of definitions.

It is the abbreviation of definition term, meaning the definition term, which is what we call the title.

Is an abbreviation for definition description, which represents a definition description.

It can be considered that a concept (term) is defined to explain the concept (term).

Note that and are sibling tags, and they are all child tags of. In general, each match has one, and one can contain multiple pairs and.

Let's look at a simple example:

HTML definition list HTML HTML is a markup language specifically used to develop web pages. You can go to the HTML tutorial to learn more. CSS CSS cascading style sheets can control the display style of HTML documents and are used to beautify web pages. You can go to the CSS tutorial to learn more. JavaScript JavaScript, abbreviated as JS, is a scripting language for developing websites (both front-end and back-end). You can go to the JS tutorial to learn more.

And although they are sibling tags, but their default style is different, with an indent, and the top grid shows, so the hierarchy is more distinct.

This is the end of the content of "what list modes are provided by HTML". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report