(011) List of XHTML documents

Source: Internet
Author: User

List of XHTML documents

A list is a collection of two or more related items. A list that contains only one item is also fully valid and, in some cases, even semantically correct. But there are multiple items that are usually organized together by a list. There are 3 types of lists in XHTML: unordered lists, ordered lists, and custom lists.

  

One, unordered list ul

The unordered list is marked with UL elements. It is used for lists of items that are less important in order, such as the list of ingredients in a recipe: Just get everything on the list, and it doesn't matter what order you take. Each list item is defined by its own Li element, which is included in the perimeter <ul> and </ul> tags. The UL element is a block-level element whose child can only be an LI element, and neither text nor other elements can appear in the unordered list unless they are contained in an LI.

In a graphical browser, the default display of an unordered table is indented with a little, and each list item has a pill line symbol before it. Of course, you can use CSS to change the default pill-shape symbol to another character or even an image.

Second, ordered list ol

The OL element is used to define an ordered list. Items in a sequence list should be read or processed in a specific order, such as the steps in a recipe. A Visual browser displays an automatically generated number next to each item in the ordered list.

As with unordered lists, the OL element is a block-level element that can contain only li.

Iii. list Items Li

In both ordered and unordered tables, the block-level LI elements are used to define individual items. A list item can contain text or other elements--even a new list.

When a list is nested in another list, the style of the inner list will vary by default based on its nesting level. In other words, each layer of nested lists is further indented, and the style of the marker symbol varies.

Iv. definition List

Defining a list is more than just a collection of items, it is a collection of items and their descriptions. The definition list does not contain list item elements (LI) as ordered and unordered lists do. The items in this list can consist of a definition term (DT) and a definition description (DD). A term can have several related instructions (that is, a dt tag can have multiple DD tags), and a description can be applied to a set of terms that appear before it. A DD followed by a DT flag a new term and a description of the beginning of the sequence, is the place to divide the parts of the definition list.

There is an implicit semantic link between the term and its description. DD and DT elements are bundled with each other, paired to participate in the structure that forms the list. Because of this semantic symbiotic relationship, definition lists are sometimes used to mark lists that are technically not composed of terms and their definitions. A series of questions and their answers, a set of images and their titles, a series of dialogues with the names of the speakers and their speeches, are the potential uses of the definition list.

1. DL Tags

The DL element is used to create a definition list. It is a block-level element that must contain at least one term (DT) or a description (DD), and the child elements of the DL can only be DT and DD elements.

2. DT Label

The DT element is a block-level element that can contain only text and/or inline elements. It identifies a term or object to be described. A definition term is associated with each subsequent note until another DT element starts a new sequence (or until the list ends at its closed tag </dl>).

3. DD Label

The DD element contains a description of the DT element immediately preceding it. In the case where a term has more than one description, each note should be wrapped in its own DD element. It is a block-level element that can contain text, inline elements, and other block-level elements. If the description is divided into multiple paragraphs, you should mark them as paragraphs (p), but should be included in a DD instead of being broken into multiple DD. The entire contents of a DD element should form a description.

In most browsers, the DD element has a slight indentation relative to the associated DT element. If DD contains other structural tag codes, such as paragraphs, the default margins for nested elements will be applied.

List of

(011) XHTML documents

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.