HTML learning table

Source: Internet
Author: User

HTML learning table

Create a table in HTML:

 

§ Use tables to divide the page layout

 

Format:

..

 

One row of data in the table
Two rows of data in the table
Three rows of data in the table

 

The test example is as follows:

  
One row of data in the table One row of data in the table
Two rows of data in the table Two rows of data in the table
Three rows of data in the table Three rows of data in the table

 

 

Tag attributes:

 

 

Border

Caption

Align

Width: Set the table width.

Height: sets the table height.

Cellspacing sets the distance between cells in the table.

Cellpadding sets the spacing between cells and text.

Bordercolor: Set the table border color.

Bordercolorlight

Bordercolordark sets the dark area color of the table.

The test procedure is as follows:

 

  
One row of data in the table One row of data in the table
Two rows of data in the table Two rows of data in the table
Three rows of data in the table Three rows of data in the table


 

Label attribute: bgcolor sets the background color. Align sets the row alignment mode. Valign sets the vertical alignment of cells

The test procedure is as follows:

 

  
One row of data in the table One row of data in the table
Two rows of data in the table Two rows of data in the table
Three rows of data in the table Three rows of data in the table

And tag attributes:

 

 

Bgcolor sets the background color of the Unit.

Rowspan sets the number of rows occupied by cells.

Colspan sets the number of columns occupied by cells.

Align

Valign sets the vertical alignment of cells

Width: Set the cell width.

Height: sets the cell height.

The test procedure is as follows:

 

  
One row of data in the table One row of data in the table
Two rows of data in the table Two rows of data in the table
Three rows of data in the table Three rows of data in the table
Rowspan
One row of data First line of data
Second row of data
Row 3
Colspan
First line of data
Second row of data Second row of data
Row 3 Row 3
Th
One row of data in the table One row of data in the table
Two rows of data in the table Two rows of data in the table
Three rows of data in the table Three rows of data in the table


 



Related Article

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.