HTML Learning Note 3-table

Source: Internet
Author: User

First, Format:

<table>

<caption> title of the table </caption>

<tr>

<th> title bar </th>

<th> title bar </th>

<th> title bar </th>

</tr>

<tr>

<td> first column </td>

<td> second column </td>

<td> third column </td>

</tr>

<tr>

<td> first column </td>

<td> second column </td>

<td> third column </td>

</tr>

<tr>

<td> first column </td>

<td> second column </td>

<td> third column </td>

</tr>

</table>

<table></table> to declare the start and end of a table

<tr>...</tr> the rows used to set the table

<th>...</th> to set the title field

<td>...</td> columns used to set the table

Ii. Properties of the table

Properties under the 1.<table> tab

Property Name Property Value Description

Border pixels | Setting the outer line of the table

cellspacing pixels/Percent setting storage grid line width

cellpadding pixels/percent set the distance between the data and the border

Width pixels/percent setting table widths

Height pixel/percent setting table heights

Align left table aligned (default)

Center table go to Middle

Right on grid

BgColor the background color of the English/16 binary table

Background the background image of the URL table

bordercolor English/16 color of the border

Bordercolorlight bright color of the same border

Bordercolordark dark color of the same border

Common Properties under the 2.<tr><th><td> tab

Property Name Property Value Description

Width pixels/percent setting widths

Height pixel/percent setting altitude

bgcolor English/16 Data bar color settings

Align (horizontal) left data aligned

Center Center Data Alignment

Right aligns data

valign (vertical) Top data is snapped to the top

Middle Data center Alignment

Bottom data is aligned by the bottom

NoWrap not wrapping in cells

3. Merging cells

Property Name Property Value Description

Colspan numbers to both sides of the field

rowspan Digit down-scale field

Example: <th colspan= "2" > merging the current cell and the right cell

<TD rowspan= "5" > merges the current cell and the four cells below the current cell

Common Properties under the 4.<caption> tab

Property Name Property Value Description

Align Top title above table

Bottom title below the table


This article is from the "Raffaele" blog, make sure to keep this source http://raffaele.blog.51cto.com/6508076/1553943

HTML Learning Note 3-table

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.