Home  >  Article  >  Web Front-end  >  How to write html table code

How to write html table code

云罗郡主
云罗郡主Original
2019-01-26 11:57:2312747browse

How to write html table code

##HTML tables are defined by the tag. Each table has several rows (defined by the tag). Each row is divided into several cells (defined by the tag).
tag definition), the letter td refers to table data, that is, the content of the data cell. Data cells can contain text, pictures, lists, paragraphs, forms, horizontal lines, tables, and more.

Recommended video tutorial: "

HTML Video Tutorial"

How to write html table code##Form Example

<table border="1">
    <tr>
        <td>row 1, cell 1</td>
        <td>row 1, cell 2</td>
    </tr>
    <tr>
        <td>row 2, cell 1</td>
        <td>row 2, cell 2</td>
    </tr>
</table>

HTML table and border properties

If the border property is not defined, the table will not display borders. Sometimes this is useful, but most of the time, we want to show the border, for example:

<table border="1">
    <tr>
        <td>Row 1, cell 1</td>
        <td>Row 1, cell 2</td>
    </tr>
</table>

For more HTML-related technical articles, please visit the

HTMLTutorial

column!

The above is the detailed content of How to write html table code. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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