Page 121 - Trackpad_ipro 4.1_Class7
P. 121
{
border:2px;
border-style:solid;
border-color:green;
background-color:orange;
color:blue;
}
</style>
Attributes of the <TD> Tag
Following are the attributes used to present the cell or table data in more effective manner:
ROWSPAN: The ROWSPAN attribute applies when a cell is extended for more than one row,
that is, the cell spans for 2 or more rows instead of 1 as shown in below table.
Here, the cell “Sports” is taking a span of 3 rows and “Martial Arts” is taking a span of 2 rows.
Example for using ROWSPAN attribute is:
<TD ROWSPAN="3">
Category Types
Badminton
Sports Football
Basketball
Judo
Martial Arts
Karate
COLSPAN: The COLSPAN attribute applies when a cell is extended to more than one column,
that is, the cell spans for 2 or more columns instead of 1, as shown in the table below:
Roll No. Name Marks Grade
First Last
Here, “Name” cell is taking a span of 2 columns.
Reb t
A list is a collection of related items.
There are three types of lists—ordered, unordered and definition list.
The <LI> tag is used to define an item in the list.
Table represents data in the form of rows and columns.
The <TR> tag is used to create a row in a table.
The <TD> tag is used to insert data into cells.
Lists and Tables in HTML 119

