How to create a table using HTML
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!