

For a row having fewer data cells, you will need to use the colspan attribute to control how the TD cells on that row are presented. Ideally, every table row will contain the same number of table data tags. The TD or table data tag is used to specify each individual data cell within a single row. It is used much like the TD - table data - tag except that the text inside the table header cell will be displayed as bold text and will be centered within the associated column. The table header (TH) tag is used to define a header cell in a row. Obviously a table can contain many TR tags. The TR or table row tag is used to define a single row in a table. Note that a table can have only one CAPTION tag. If the CAPTION tag is used, it must immediately follow the associated TABLE tag. The CAPTION tag is used to add a title area at the top of the table. These attributes are applied to the table as a whole. The TABLE tag has several attributes associated with it that control the overall appearance of the table.

The TABLE tag defines the scope of the table beginning with the opening tag and ending with the closing tag.
Html tables code#
If you are going to create your own HTML document to recreate the effects illustrated here, I suggest that you create a separate CSS file and call it into your HTML document by placing the following line of code in the HEAD section of your HTML document: įollowing are the HTML table tags that will be used in the course of this tutorial. In this tutorial I am going to introduce you to the HTML tags associated with tables, some (but not all) of the attributes associated with these tags, and the use of CSS to assign values to these attributes. In fact the previous version of this web site used nested tables to manage page layout by creating table cells for the banner, navigation, content, and footer sections. In the days before CSS (Cascading Style Sheets), tables were used not only to display rows and columns of data, but to control the layout of the entire web page. Mastery of HTML (Hypertext Markup Language) tables does not have the importance it once did.
