Mẹo Nested unordered list HTML 2022

Kinh Nghiệm Hướng dẫn Nested unordered list HTML Chi Tiết

Quý khách đang tìm kiếm từ khóa Nested unordered list HTML được Cập Nhật vào lúc : 2022-12-24 00:05:20 . Với phương châm chia sẻ Bí quyết về trong nội dung bài viết một cách Chi Tiết 2022. Nếu sau khi đọc tài liệu vẫn ko hiểu thì hoàn toàn có thể lại Comment ở cuối bài để Ad lý giải và hướng dẫn lại nha.

previous next contents elements attributes index

10 Lists

Contents

Nội dung chính

    10.1 Introduction to lists10.2 Unordered lists (UL), ordered lists (OL), and list items (LI)10.3 Definition lists: the DL, DT, and DD elements10.3.1 Visual rendering of lists10.4 The DIR and MENU elementsVideo liên quan

Introduction to listsUnordered lists (UL), ordered lists (OL), and list items (LI)Definition lists: the DL, DT, and DD elementsVisual rendering of listsThe DIR and MENU elements

10.1 Introduction to lists

HTML offers authors several mechanisms for specifying lists of information. All lists must contain one or more list elements. Lists may contain:

    Unordered information.Ordered information.Definitions.

The previous list, for example, is an unordered list, created with the UL element:


  • Unordered information.
  • Ordered information.
  • Definitions.

An ordered list, created using the OL element, should contain information where order should be emphasized, as in a recipe:

Mix dry ingredients thoroughly.Pour in wet ingredients.Mix for 10 minutes.Bake for one hour 300 degrees.

Definition lists, created using the DL element, generally consist of a series of term/definition pairs (although definition lists may have other applications). Thus, when advertising a product, one might use a definition list:

Lower costThe new version of this product costs significantly less than the previous one!Easier to useWe’ve changed the product so that it’s much easier to use!Safe for kidsYou can leave your kids alone in a room with this product and they won’t get hurt (not a guarantee).

defined in HTML as:


Lower cost
The new version of this product costs significantly less than the
previous one!
Easier to use
We’ve changed the product so that it’s much easier to use!
Safe for kids
You can leave your kids alone in a room with this product and
they won’t get hurt (not a guarantee).

Lists may also be nested and different list types may be used together, as in the following example, which is a definition list that contains an unordered list (the ingredients) and an ordered list (the procedure):

The ingredients:

    100 g. flour10 g. sugar1 cup water2 eggssalt, pepper

The procedure:Mix dry ingredients thoroughly.Pour in wet ingredients.Mix for 10 minutes.Bake for one hour 300 degrees.Notes:The recipe may be improved by adding raisins.

The exact presentation of the three list types depends on the user agent. We discourage authors from using lists purely as a means of indenting text. This is a stylistic issue and is properly handled by style sheets.

10.2 Unordered lists (UL), ordered lists (OL), and list items (LI)

Start tag: required, End tag: required

Start tag: required, End tag: optional

Attribute definitions

type = style-information [CI]Deprecated. This attribute sets the style of a list item. Currently available values are intended for visual user agents. Possible values are described below (along with case information).start = number [CN]Deprecated. For OL only. This attribute specifies the starting number of the first item in an ordered list. The default starting number is “1”. Note that while the value of this attribute is an integer, the corresponding label may be non-numeric. Thus, when the list item style is uppercase latin letters (A, B, C, …), start=3 means “C”. When the style is lowercase roman numerals, start=3 means “iii”, etc.value = number [CN]Deprecated. For LI only. This attribute sets the number of the current list item. Note that while the value of this attribute is an integer, the corresponding label may be non-numeric (see the start attribute).compact [CI]Deprecated. When set, this boolean attribute gives a hint to visual user agents to render the list in a more compact way. The interpretation of this attribute depends on the user agent.

Attributes defined elsewhere

    id, class (document-wide identifiers)lang (language information), dir (text direction)title (element title)style (inline style information)onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)

Ordered and unordered lists are rendered in an identical manner except that visual user agents number ordered list items. User agents may present those numbers in a variety of ways. Unordered list items are not numbered.

Both types of lists are made up of sequences of list items defined by the LI element (whose end tag may be omitted).

This example illustrates the basic structure of a list.


  • … first list item…
  • … second list item…

Lists may also be nested:

DEPRECATED EXAMPLE:


  • … Level one, number one…

    1. … Level two, number one…
    2. … Level two, number two…

      1. … Level three, number one…

    3. … Level two, number three…

  • … Level one, number two…

Details about number order. In ordered lists, it is not possible to continue list numbering automatically from a previous list or to hide numbering of some list items. However, authors can reset the number of a list item by setting its value attribute. Numbering continues from the new value for subsequent list items. For example:

  1. makes this list item number 30.
  2. makes this list item number 40.
  3. makes this list item number 41.

10.3 Definition lists: the DL, DT, and DD elements

Start tag: required, End tag: required

Start tag: required, End tag: optional

Attributes defined elsewhere

    id, class (document-wide identifiers)lang (language information), dir (text direction)title (element title)style (inline style information)onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)

Definition lists vary only slightly from other types of lists in that list items consist of two parts: a term and a description. The term is given by the DT element and is restricted to inline content. The description is given with a DD element that contains block-level content.

Here is an example:


Dweeb
young excitable person who may mature
into a Nerd or Geek
tin tặc
a clever programmer
Nerd
technically bright but socially inept person

Here is an example with multiple terms and descriptions:


Center
Centre
A point equidistant from all points
on the surface of a sphere.
In some field sports, the player who
holds the middle position on the field, court,
or forward line.

Another application of DL, for example, is for marking up dialogues, with each DT naming a speaker, and each DD containing his or her words.

10.3.1 Visual rendering of lists

Note. The following is an informative description of the behavior of some current visual user agents when formatting lists. Style sheets allow better control of list formatting (e.g., for numbering, language-dependent conventions, indenting, etc.).

Visual user agents generally indent nested lists with respect to the current level of nesting.

For both OL and UL, the type attribute specifies rendering options for visual user agents.

For the UL element, possible values for the type attribute are disc, square, and circle. The default value depends on the level of nesting of the current list. These values are case-insensitive.

How each value is presented depends on the user agent. User agents should attempt to present a “disc” as a small filled-in circle, a “circle” as a small circle outline, and a “square” as a small square outline.

A graphical user agent might render this as:

for the value “disc”
for the value “circle”
for the value “square”

For the OL element, possible values for the type attribute are summarized in the table below (they are case-sensitive):

TypeNumbering style1arabic numbers1, 2, 3, …alower alphaa, b, c, …Aupper alphaA, B, C, …ilower romani, ii, iii, …Iupper romanI, II, III, …

Note that the type attribute is deprecated and list styles should be handled through style sheets.

For example, using CSS, one may specify that the style of numbers for list elements in a numbered list should be lowercase roman numerals. In the excerpt below, every OL element belonging to the class “withroman” will have roman numerals in front of its list items.

OL.withroman list-style-type: lower-roman


  1. Step one …
  2. Step two …

The rendering of a definition list also depends on the user agent. The example:


Dweeb
young excitable person who may mature
into a Nerd or Geek
tin tặc
a clever programmer
Nerd
technically bright but socially inept person

might be rendered as follows:

Dweeb
young excitable person who may mature into a Nerd or Geek
tin tặc
a clever programmer
Nerd
technically bright but socially inept person

10.4 The DIR and MENU elements

DIR and MENU are deprecated.

See the Transitional DTD for the formal definition.

Attributes defined elsewhere

    id, class (document-wide identifiers)lang (language information), dir (text direction)title (element title)style (inline style information)onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)

The DIR element was designed to be used for creating multicolumn directory lists. The MENU element was designed to be used for single column menu lists. Both elements have the same structure as UL, just different rendering. In practice, a user agent will render a DIR or MENU list exactly as a UL list.

We strongly recommend using UL instead of these elements.

previous next contents elements attributes index

://.youtube/watch?v=aRMb1cU53U0

Reply
4
0
Chia sẻ

Video Nested unordered list HTML ?

Bạn vừa Read tài liệu Với Một số hướng dẫn một cách rõ ràng hơn về Clip Nested unordered list HTML tiên tiến và phát triển nhất

Share Link Download Nested unordered list HTML miễn phí

Heros đang tìm một số trong những Chia SẻLink Tải Nested unordered list HTML Free.

Giải đáp vướng mắc về Nested unordered list HTML

Nếu sau khi đọc nội dung bài viết Nested unordered list HTML vẫn chưa hiểu thì hoàn toàn có thể lại phản hồi ở cuối bài để Tác giả lý giải và hướng dẫn lại nha
#Nested #unordered #list #HTML

Phone Number

Recent Posts

Tra Cứu MST KHƯƠNG VĂN THUẤN Mã Số Thuế của Công TY DN

Tra Cứu Mã Số Thuế MST KHƯƠNG VĂN THUẤN Của Ai, Công Ty Doanh Nghiệp…

2 years ago

[Hỏi – Đáp] Cuộc gọi từ Số điện thoại 0983996665 hoặc 098 3996665 là của ai là của ai ?

Các bạn cho mình hỏi với tự nhiên trong ĐT mình gần đây có Sim…

2 years ago

Nhận định về cái đẹp trong cuộc sống Chi tiết Chi tiết

Thủ Thuật về Nhận định về nét trẻ trung trong môi trường tự nhiên vạn…

2 years ago

Hướng Dẫn dooshku là gì – Nghĩa của từ dooshku -Thủ Thuật Mới 2022

Thủ Thuật về dooshku là gì - Nghĩa của từ dooshku -Thủ Thuật Mới 2022…

2 years ago

Tìm 4 số hạng liên tiếp của một cấp số cộng có tổng bằng 20 và tích bằng 384 2022 Mới nhất

Kinh Nghiệm Hướng dẫn Tìm 4 số hạng liên tục của một cấp số cộng…

2 years ago

Mẹo Em hãy cho biết nếu đèn huỳnh quang không có lớp bột huỳnh quang thì đèn có sáng không vì sao Mới nhất

Mẹo Hướng dẫn Em hãy cho biết thêm thêm nếu đèn huỳnh quang không còn…

2 years ago