What is the basic structure of html table? Detailed explanation of the complete code of html table

云罗郡主
Release: 2018-11-12 13:46:20
Original
9618 people have browsed it

Tables are used a lot in web page production. Many websites require tutorials to have a large number of tables. The use of tables not only makes the data clearer, but also makes the tables more beautiful. So what is the basic structure of html tables? Below we explain in detail the complete code of the html table. [Recommended reading: What does HTML mean? What does its basic structure refer to?

What is the basic structure of the html table? Detailed explanation of the complete code of the html table

The most basic tags of the table are some attributes, such as table tag, tr tag and td tag, where the table tag contains

and , syntax Display for:
<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>表格基本结构</title>
</head>
<body>
    <table>        
        <tr>
            <td>单元格1</td>
            <td>单元格2</td>
        </tr>
        <tr>
            <td>单元格3</td>
            <td>单元格4</td>
        </tr>
    </table>
</body>
</html>
Copy after login

:

What is the basic structure of html table? Detailed explanation of the complete code of html table

In the above code, tr represents the table row, td represents the table cell, and th is the header of the table , generally cannot be ignored. Among them, tr and td mark the start and end. There are several

in the table to indicate how many rows there are. Generally, by default, it means there is no border. If you want to add color to the border, you can use CSS to set the border, so that users can better view the data.

With the advancement of technology, many programmers do not choose to use tables to layout tables. Instead, they choose some DIV CSS to layout. When using tables to layout websites, a lot of code will appear, resulting in code redundancy. .

The above is what is the basic structure of html tables? A complete introduction to the detailed code of the html table. If you want to know more about Html5 tutorial, please pay attention to the php Chinese website.


The above is the detailed content of What is the basic structure of html table? Detailed explanation of the complete code of html table. 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