Examples of using html unordered list tags and ordered list tags

Examples of using html unordered list tags and ordered list tags

1. Upper and lower list tags: <dl>..</dl>:

Upper dt
The lower layer dd: the encapsulated content will be automatically indented


Copy code
The code is as follows:

<dl>
<dt>Sports and Outdoors</dt>
<dd>Sneakers</dd>
<dd>Basketball shoes</dd>
<dd>Football shoes</dd>
<dd>Running shoes</dd>
</dl>

2. Define an ordered list: <ol>

property:
type: You can set the sorting style (you can also add this attribute to li separately)
1 means 1,2,3,4
a means a,b,c,d
A means A, B, C, D
i means i,ii,iii
I means I, II, III
start: starting point of the list<li>: list content

Copy code
The code is as follows:

<ol type="a" start="55">
<li>Sneakers</li>
<li>Basketball shoes</li>
<li>Running shoes</li>
<li>Soccer shoes</li>
</ol>

3. Define an unordered list: <ul>

Attribute: type: You can set the sorting style or add this attribute to li separately.
dise solid circle (default value)
circle hollow circle
square solid square
<li>: List content

Copy code
The code is as follows:

<ul type="square">
<li type="disc">Sneakers</li>
<li>Basketball shoes</li>
<li>Running shoes</li>
<li>Soccer shoes</li>
</ul>

<<:  Detailed explanation of prototypes and prototype chains in JavaScript

>>:  Methods and techniques for designing an interesting website (picture)

Recommend

JavaScript custom plug-in to implement tab switching function

This article shares the specific code of JavaScri...

The ultimate solution for writing bash scripts with nodejs

Table of contents Preface zx library $`command` c...

Code analysis of synchronous and asynchronous setState issues in React

React originated as an internal project at Facebo...

Detailed explanation of Vue's simple store

The simplest application of store in Vue is globa...

Detailed explanation of pure SQL statement method based on JPQL

JPQL stands for Java Persistence Query Language. ...

HTML markup language - reference

Click here to return to the 123WORDPRESS.COM HTML ...

JavaScript type detection method example tutorial

Preface JavaScript is one of the widely used lang...

Solution to HTML2 canvas SVG not being recognized

There is a new feature that requires capturing a ...

Vue implements an Input component that gets the key display shortcut key effect

I encountered a requirement to customize shortcut...

A question about border-radius value setting

Problem Record Today I was going to complete a sm...

Native JS realizes compound motion of various motions

This article shares with you a compound motion im...

Summary of three ways to implement ranking in MySQL without using order by

Assuming business: View the salary information of...

Web data storage: Cookie, UserData, SessionStorage, WebSqlDatabase

Cookie It is a standard way to save the state of ...