HTML learning 7: Table tags of common tags

Source: Internet
Author: User

HTML learning 7: Table tags of common tags

Table labels can be used to create tables in the HTNL markup language.

Table label list:

Table

Label. Each table has several rows (defined by tags) and each row is divided into several cells (defined Table Without Borders
100 200 300
400 500 600
Table with borders
Row 1, cell 1 Row 1, cell 2
Row 2, cell 1 Row 2, cell 2
Heading Another Heading
Row 1, cell 1 Row 1, cell 2
Row 2, cell 1 Row 2, cell 2
Display of cells with no content:
Row 1, cell 1 Row 1, cell 2
  Row 2, cell 2
Cells without content are displayed in cells replaced by space characters:
Row 1, cell 1 Row 1, cell 2
  Row 2, cell 2
Table title
Name Zhang San
Age 30
Table title
Personal Information
Zhang San 30
Table title
Personal Information Zhang San
30
Label definition ). The letter td refers to table data, that is, the content of the data cell. Data cells can contain text, images, lists, paragraphs, forms, horizontal lines, tables, and so on.

 

1. boder
If the border attribute is not defined, the table does not display the border. Sometimes this is useful, but most of the time we want to display borders. Create a table without the border attribute and use the border attribute to display a table with a border:

 

The browser displays the following results:

 

2. Table Header
Table header usage

Label. Most browsers display the header as text centered in bold:

 

 

The browser displays the following results:

 

3. Empty cells in the table
In some browsers, table cells with no content are not displayed very well. If a cell is empty (with no content), the browser may not be able to display the border of the cell. The border of the empty cell is not displayed. To avoid this problem, you can add a space placeholder to an empty cell to display the border.

 

IE8.0 displays the following results:

 

The result displayed in Chrome is:

4. Table with title and cross-row or cross-Column

 

The browser displays the following results:

 

In the table, you can also nest other labels in the grid labels, or perform various fancy designs, background colors, or background images. You can also arrange the data content in a table. You can add more table designs to the last five tags in the table label list.


 

 


 





 


 

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.