Home > Article > Web Front-end > What are the list tags in html
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.
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
: 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)
: Specify the starting sequence number of the list
: Specify the list item tag type (numbers, Roman numerals, letters, etc.)
Unordered list (UL)
: Specify the list item mark type (dot, square, dash, etc.)
Definition list (DL)
Example
Ordered list:
<code class="html"><ol start="5"> <li>项目 5</li> <li>项目 6</li> <li>项目 7</li> </ol></code>
Unordered list:
<code class="html"><ul type="square"> <li>项目 1</li> <li>项目 2</li> <li>项目 3</li> </ul></code>
Definition list:
<code class="html"><dl> <dt>HTML</dt> <dd>超文本标记语言</dd> <dt>CSS</dt> <dd>层叠样式表</dd> </dl></code>
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!