HTML Learning Notes (eight) table

Source: Internet
Author: User

The HTML table uses the table label. The table tag contains a tr(table row) sub-label, and thetr also contains th(table head) and TD(table Data) sub-tags such as nested structures

Code Demo

1 <TableBorder= "1"width= "All">2     <TR>3         <th>Name</th>4         <th>Age</th>5         <th>Sex</th>6     </TR>7     <TR>8         <TD>Xiaohu</TD>9         <TD>19</TD>Ten         <TD>Man</TD> One     </TR> A </Table>    

The effect is:

  Th header as part of the table structure, not data, and header text default bold, bold and centered

When reviewing the page elements, you will find that the table below is nested with a level tbody, or you can display the declaration tbody in the code snippet.

  

Property:

  The properties of table are Border,width,height,bgcolor (background color), background (background image), BorderColor,

cellspacing (spacing between cells), cellpadding (margin of text within a cell)

The TD properties are align(position),valign(vertical Align vertical) [Top,middle,bottom],colspan( Column span cross-column ),rowspan( cross-line )

The following effects

HTML Learning Notes (eight) 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.