HTML Learning Note 06

Source: Internet
Author: User

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.

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.