What are the list tags in html

下次还敢
Release: 2024-04-27 21:12:49
Original
792 people have browsed it

List tags in HTML cover ordered lists, unordered lists and definition lists: Ordered list (OL): Mark sequential list items with numbers or letters; Unordered list (UL): Use dots or Squares mark unordered list items; definition list (DL): a paired list of defined terms and descriptions.

What are the list tags in html

List tags in HTML

HTML provides a variety of list tags for creating ordered lists , unordered list and definition list.

Ordered list (OL)

  • ##
      : Ordered list start tag
    1. : list item (element)
    : ordered list end tag

Unordered list (UL)

    • : Unordered list start tag
    • : List item (element)
    : End tag of unordered list

Definition list (DL)

  • : Define list start tag
  • : Define term (subtitle)
  • : Definition description (text)
  • : Definition list end tag

Attributes

Ordered list (OL)

  • start: Specify the starting sequence number of the list
  • type: Specify the list item tag type (numbers, Roman numerals, letters, etc.)

Unordered list (UL)

  • type: Specify the list item mark type (dot, square, dash, etc.)

Definition list (DL)

    No special attributes

Example

Ordered list:

<code class="html"><ol start="5">
  <li>项目 5</li>
  <li>项目 6</li>
  <li>项目 7</li>
</ol></code>
Copy after login

Unordered list:

<code class="html"><ul type="square">
  <li>项目 1</li>
  <li>项目 2</li>
  <li>项目 3</li>
</ul></code>
Copy after login

Definition list:

<code class="html"><dl>
  <dt>HTML</dt>
  <dd>超文本标记语言</dd>
  <dt>CSS</dt>
  <dd>层叠样式表</dd>
</dl></code>
Copy after login

The above is the detailed content of What are the list tags in html. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!