HTML Table Learning-9.22

Source: Internet
Author: User

1. Table Label Representative form

TR tag represents a row, the TD tag data

Specific format: <table border= "1" > border= "1" for normal border, border= "8" thick border, border= "15" very thick border

<tr>

<td> Data in table 1</td> the left side represents the first row of two rows of data

Data 2</td> in the <td> form

</tr>

<tr>

<td> data in table 1</td> two rows of data on the left side of the second row, showing a table of two rows and two columns

Data 2</td> in the <td> form

<tr>

</table>

Note: No border properties are defined and the table will not show borders

2. Header definition: Usually defined with <th> tags

<th> Head 1</th>

<th> Head 2</th>

<th> on the outside of the TR is indicated as the table header of the entire table, placed in the TR to indicate a row of the table header

3. Empty form

The border may not be displayed when the <td></td> table is empty

<td>&nbsp;</td> placeholder to show the border.

4. The title of the table:<caption> my title </caption>

5. Table cells that span rows or columns

colspan= "2" Cell is two columns

rowspan= "2" cell takes up two lines
6. Labels in the table

A table cell can contain multiple segments and list information

eg

<td> This unit contains a table:
<table border= "1" >
<tr>
<td>A</td>
<td>B</td>
</tr>
<tr>
<td>C</td>
<td>D</td>
</tr>
</table>
</td>

7. Cell Margins and spacing

cellpadding= "10" margin, cellspacing= "10"

8. Add a background color or image for the table

<table bgcolor= "Red", background= "f:\img_20140713_192114.jpg>

9. Add a background color or image for the cell

<TD bgcolor= "Blue" background= "F:\IMG_20140713_192114.jpg" > Content </td>

10. Arrange content for the cell table

Align= "left", align= the "right" content to align or align

11. Frame Properties

Frame= "box", frame= "above", frame= "below", frame= "Hsides"

HTML Table Learning-9.22

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.