Chapter 3 Table Elements-Original Water

Source: Internet
Author: User
Chapter 4 Table Elements-original learning points of water:

1. Table element Summary

2. construct table Parsing

Lecturer: Li Yanhui

This chapter describes how to use table elements in HTML5. A table is mainly used to display two-dimensional data in a grid.

I. Table element Summary

The basic structure of a table requires at least three elements:

, ,
, And some others exist as optional aids.

Element name





Indicates the title line.


Table subject


Table foot


Indicates a row of cells.


Indicates the header row cell.




Indicates a column


Indicates a group of columns.


Table title

Ii. Build table Parsing


Build basic tables

Zhang San Male Unmarried
Li Si Female Married


Element indicates the declaration of a table, Element indicates a row in the table,
Element indicates a cell. By default, the table has no borders. Therefore


Add Header



Add Table foot


Add Table subject




Set Columns



More flexible column setting



              Add a border attribute to the element and set it to 1 to display the border. 
               The element restricts and standardizes the table header. Especially when the header is dynamically generated in the future, its position is not fixed. You can use this element to limit it to the starting position. 
               The element is used to generate table scripts, which are limited to the bottom of the table. 
               The element mainly contains the body part of a non-header table, which helps the table format to be clear and further facilitates CSS and JavaScript control. 
             The element is used to process a column. The span attribute defines which columns to process. 1 indicates the first column, 2 indicates the first two columns. If you want to set the second column separately, you need to declare two. First, process the first column, move the column points to the second place, and then process the second one. 
             Each element represents a single column, and each element represents a column, making the control more flexible. If span is set, multiple columns are controlled. 
Add a title cell to the table

Name Gender Marriage
Zhang San Male Unmarried
Li Si Female Married


The element is mainly used to add the cells of the title row. The actual function is to center and bold the internal text. A general attribute style is used here. It is mainly used for CSS style settings and will be involved in the future. All belong to cells and contain two merging attributes: colspan and rowspan.


Name Gender Marriage
Statistics: Two
Zhang San Male Unmarried
Li Si Female Married
Add Table title

This is a character table. Element to add a title to the 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: 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.