

In the article above, I have tried to specify some of the HTML table’s features. If you do not give a background color to the table, you can set a certain row color: Figure 10. We can differentiate between the two tabs of the tab data exactly as in the model below: Figure 9. An example of nesting tables is listed below: Listing 8. But it might sometimes be necessary, for example when you want to import content easily from other sources.
#Html tables code#
We can nest a table inside another one, by including the complete structure, also the element, but, in general, this is not recommended, because it makes the code confusing. This attribute is defined by both and Syntax: Listing 7. The SCOPE attribute indicates what is the header cell - a column, a group of columns, a row or row of rows. This attribute is used to indicate a style in a style sheetīe careful! The specified value should not be repeated in the HTML document. The ID attribute is unique, so it can model a single item on the web page. COLSPAN defines the number of columns a table cell can contain Listing 5. Table Example Using the Labels Above ĬOLSPAN is the attribute of the tag and can be used on the following elements.

The tag is used to group header content into the table, this tag is used together with the and tags to specify the header, body, and footer. In the table below you will find the schedule for the whole week: This tag defines a table subtitle and should be used immediately after using the : Listing 3. In the following samples we will use some more advanced methods such as summaries, subtitles, and rows in the table.

The contents of each table are between these two tags:, : Listing 2. Example of a simple table Īnother example of a table that includes several headers. Through the table, you can interpret between different types of data and values. The row in the table is defined by the tag, the table header is defined by the tag and the date table is defined by the. The HTML table represents an HTML structure for creating rows and columns on a web page (tabular data).
