Detailed introduction to HTML tables

高洛峰
Release: 2017-03-21 17:46:13
Original
2089 people have browsed it

HTML 表格实例:

First Name Last Name Points
Jill Smith 50
Eve Jackson 94
John Doe 80
Adam Johnson 67

HTML table

Tables are defined by the

tag. Each table has a number of rows (defined by tags), and each row is divided into a number of cells (defined by
tags). The letters td refer to table data, the contents of data cells. Data cells can contain text, pictures, lists, paragraphs, forms, horizontal lines, tables, and more.

Table example










row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2

The browser displays as follows: :

row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2

HTML table and border attributes

If you do not define the border attribute, the table will not display borders. Sometimes this is useful, but most of the time, we want the border to show.

Use the border attribute to display a table with borders:






Row 1, cell 1 Row 1, cell 2

HTML table header

The header of the table is defined using the

tag.

Most browsers will display the header as bold, centered text:














Header 1 Header 2
row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2

The browser displays the following:

Header 1 Header 2
row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2

HTML table tag

Label describe
Define table
Define the header of the table
Define table rows
Define table cells
Define table title
Groups that define table columns
Define properties for table columns
Define table header
Define the body of the table
Define table footer

The above is the detailed content of Detailed introduction to HTML tables. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template