
The individual column headings are also described by the heading codes, and. Finally, the tag created a space above the title. In this table, notice that the and commands made the title larger. To add emphasis to the header, you can use the header commands to make the text larger.
#Construct 3 tag code
Since this table has two columns, the COLSPAN="2" code was necessary. However, if you want the title to span across the columns below it, you need to include the COLSPAN=n code. The heading codes, and, define a heading cell and, by default, these codes center the heading and set it in bold type. To add a title to your table, you would place the title and the attributes of that title between the row commands, and. Depending on how you design your table, you can then determine the border size that best suits your table and the overall design of your web page. The number that you ascribe to the border tag, BORDER=n, sets the width of the table border. Notice that the beginning table tag,, now includes the border tag, BORDER="5", which places a border around the table and frames each cell. Note: If you wish to view the codes that generated the Data 1 through Data 6 cells, refer to the previous section. The following codes generated the border, TABLE TITLE, and Column A and Column B headings for this table: For example, if you add a border, title, and column headings to the table in the previous section, the table would then resemble the following: In addition to the basic table tags, several options are available for adding additional elements to your table. The codes for these elements are explained in the next section. If you wish to add any of these elements to your table, you need to include additional HTML codes. This table contains no border, title, or headings. The codes that generated this table look like this:

The following table is an example of a basic table with three rows and two columns of data.

Then, for each new row, you would repeat the process of beginning the row, building each cell in the row, and closing the row. When you finish all of the cells for a row, you would then close the row with the ending row tag. To do this, you would first start the row with the beginning row tag,, and then build the row by creating each cell with the beginning cell tag,, adding the data for that cell, and then closing the cell with the ending cell tag. Between these tags, you then construct each row and each cell in the row. The basic structure of an HTML table consists of the following tags:Ĭonstructing an HTML table consists of describing the table between the beginning table tag,, and the ending table table tag.
