first, the HTML list
1. Unordered list
An unordered list is a list of items that starts with the <ul> tag, and each list item starts with <LI>, such as:
1 |
<!-- unordered list - |
2 |
<ul> |
3 |
<li>html</> |
4 |
<li>css</> |
5 |
<Li>javascript</li> |
6 |
</ul> |
Display effect:
2. Ordered list
The list item is also a column of items, and the listing items are marked with numbers, and the sequence table starts with the <ol> tag. Each list item starts with the <li> label.
1 |
There are sequence tables |
2 |
<ol > |
3 |
<li>html</li> |
4 |
<li>css</li> |
5 |
<li>javascript</li> |
6 |
</ol> |
Display effect:
3. Define the list
The custom list starts with the <dl> tab, and each custom list item starts with <dt> and the definition of each custom list item starts with <dd>.
1 |
custom list --> |
2 |
<dl > |
3 |
< Span style= "Font-family:consolas; Background-color:white; " > <dt> Beijing < Span style= "background-color:white;" ></dt> |
4 |
< Span style= "Font-family:consolas; Background-color:white; " > <dd> Haidian District < Span style= "background-color:white;" ></dd> |
5 |
< Span style= "Font-family:consolas; Background-color:white; " > <dd> Xicheng < Span style= "background-color:white;" ></dd> |
6 |
< Span style= "Font-family:consolas; Background-color:white; " > <dt> Shanghai < Span style= "background-color:white;" ></dt> |
7 |
< Span style= "Font-family:consolas; Background-color:white; " > <dd> Xuhui < Span style= "background-color:white;" ></dd> |
8 |
< Span style= "Font-family:consolas; Background-color:white; " > <dd> Putuo < Span style= "background-color:white;" ></dd> |
9 |
</dl> |
Display effect:
Second, HTML block
1. HTML block elements
Most HTML elements are defined as block-level elements or inline elements. Block-level elements usually start (and end) with a new line when the browser is displayed.
Example:
2. HTML inline elements
Inline elements typically do not start with new lines when they are displayed.
Example:<b>, <td>, <a>, .
3. html<div> elements
HTML <div> elements are block-level elements that are containers that can be used to combine other HTML elements without a specific meaning.
<div> has two main functions: one is to use CSS to set style attributes for large chunks of content, and the other is to make HTML document layout.
4. html<span> elements
HTML <span> elements are inline elements that can be used as a container for text, and it does not have a specific meaning.
<span> is to work with CSS and set style properties on some text.