(reproduced) How to use table in HTML

Source: Internet
Author: User

Colspan indicates the number of columns to the right of the cell. RowSpan indicates the number of columns that the cell has opened down.

Colspan is a horizontal merge cell, colspan= "3" represents a horizontal merge of three TD

RowSpan is a vertical merged cell, rowspan= "2" means vertical merging of two TD

Source:

<table width= "height=" bordercolor= "Red" border= "1" cellspacing= "0″cellpadding=" 0″>
<caption> This is a table </caption>
<TD colspan= "3" > First second third one

Fourth <TD rowspan= "2" > Fifth eighth of Sixth

<TD > Nineth of Seventh

Look at the following table:


Form code:




the second to third column of the first row

You may not be able to see it very clearly. If you use Dreamweaver to reproduce the process of making a table, I believe you will soon understand the mystery. First, make a table of three rows and three columns (this is the "prototype" of the table above), and then merge the second to third column of the first row, the first column in the second row, the first column in the third row, and the table in the previous example. You can test it yourself.

First Row first column First row, second column First row, third column
Second row, first column Second row, second column Second row, third column
The first column of the third row Third row, second column Third row, third column

Master the colspan and rowspan properties of the form, and make complex forms as you wish.

  2. Title Column in table

The function of the is to label a table with a header column, as if it were added to a table with no grid lines, usually to hold the table headings, with align and valign parameters.
Align represents the alignment (horizontal) of the table header column relative to the table, with the optional values: Left, center, right, top, middle, bottom, if align= "bottom" the title column will appear below the table, regardless of your original code is the The is placed in the head or tail of


.Valign represents the alignment of the table header column relative to the table (up and down), with the optional value: top, bottom.

Reference Address: http://blog.chinaunix.net/uid-15014334-id-3816771.html

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.