Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to create a table using HTML

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to use HTML to create tables, I hope you will learn something after reading this article, let's discuss it together!

Example

Form

This example demonstrates how to create a table in an HTML document.

Table border

This example demonstrates various types of table borders.

(more instances can be found at the bottom of this page. )

Form

Tables are defined by tags. Each table has several rows (defined by tags), and each row is divided into cells (defined by tags). The letter td refers to tabular data (table data), that is, the contents of data cells. Data cells can contain text, pictures, lists, paragraphs, forms, horizontal lines, tables, and so on.

Row 1, cell 1

Row 1, cell 2

Row 2, cell 1

Row 2, cell 2

It appears in the browser as follows:

Row 1, cell 1 row 1, cell 2

Row 2, cell 1 row 2, cell 2

Table and Border Properties

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

Use the border properties to display a table with borders:

Row 1, cell 1

Row 1, cell 2

The header of the form

The header of the table is defined with a label.

Most browsers display the header as text centered in bold:

Heading

Another Heading

Row 1, cell 1

Row 1, cell 2

Row 2, cell 1

Row 2, cell 2

It appears in the browser as follows:

Heading Another Heading

Row 1, cell 1 row 1, cell 2

Row 2, cell 1 row 2, cell 2

Empty cells in a table

Table cells without content do not display very well in some browsers. If a cell is empty (with no content), the browser may not be able to display the border of the cell.

Row 1, cell 1

Row 1, cell 2

Row 2, cell 2

After reading this article, I believe you have a certain understanding of "how to use HTML to create forms". If you want to know more about it, please follow the industry information channel. Thank you for your reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report