How are tables created in HTML? (code example)

藏色散人
Release: 2018-08-09 17:01:02
Original
11563 people have browsed it

Data tables are certainly no stranger to everyone. In addition to excel tables, there are also tables displayed in our website production. The function of the table is clear at a glance. In order to view data and statistics more directly, how is the table on the website's HTML page created? So this article will introduce to you a tutorial on making HTML tables.

We first introduce the relevant tags for making HTML tables:

The specific codes for html table production and examples are as follows:

  
  1. 基本表格样式:
  2. 1.1 1.2 1.3
    2.1 2.2 2.3
    3.1 3.2 3.3
  3. 无边框表格:
  4. 1.1 1.2 1.3
    2.1 2.2 2.3
    3.1 3.2 3.3
  5. 双线表格:
  6. 1.1 1.2 1.3
    2.1 2.2 2.3
    3.1 3.2 3.3
  7. 合并表格列:
  8. 1.1
    2.1 2.2 2.3
    3.1 3.2 3.3

    注:colspan在css中失效

  9. 合并表格行:
  10. 1.1 1.2 1.3
    2.2 2.3
    3.2 3.3

    注:rowspan在css中失效

  11. 复杂表格(一)
  12. 1.1 1.2
    2.1 2.2 2.3
    3.1 3.3
  13. 复杂表格(二)
  14. 1.1 1.2 1.3
    2.1 2.3
    3.1 3.2
Copy after login

The effect is as shown below:

How are tables created in HTML? (code example)


So this article introduces the method of making HTML tables through the demonstration of table html code. Hope it helps those in need!



Define HTML tables Tags define the header of the table Tag table body (text) Tag defines the footer of the table (footnote or table note) Element defines the table Row tags define attribute values for one or more columns in the table. The tag is used to group columns in a table for formatting purposes.
Element defines table header

Element defines table cell

Element defines table title, which must immediately follow the table tag . Only one title can be defined for each table, which is centered above the table by default.

The above is the detailed content of How are tables created in HTML? (code example). 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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!