Current location - Recipe Complete Network - Complete cookbook - Make a table (table label) with HTML.
Make a table (table label) with HTML.
The table tag defines an HTML table, which consists of one or more tr, th or td elements. The tr element defines the rows of the table, the th defines the title, and the td defines the table cell, that is, the displayed content. Here's how to make a table with HTML.

0 1 Create a new HTML file and name it testTable.html.

Add table labels and show the data by taking provinces and provincial capitals as examples. The code is as follows.

Right-click the blank space of the code, select Browser Open, and then select Default.

Automatically jump to the browser, the effect is as follows.

Let's add styles, borders and other elements to the table. The code is as follows.

06 refresh the browser, the final effect is as follows