You are on page 1of 12

WEB ENABLED TECHNOLOGY

Semester-II(2024-25)

HTML(Lect5)

Department of DSAI

January 15, 2024

1/12
DSAI WEB ENABLED TECHNOLOGY January 15, 2024
HTML TABLE

HTML tables are created using the HTML<table> tag.


we combine this tag with other tags that define each row and column
within our table.
The <tr>tags to define each table row.
The <th> tags define the table header cells
The <td>tags define each table data cell.
The table header cells display the text slightly differently to the table
data cells.
Table rows and columns are container elements that contain other
html elements such as text links images and lists
You can also change the color of individual row or column by using
bgcolor attribute on <tr> <td>or<th>

2/12
DSAI WEB ENABLED TECHNOLOGY January 15, 2024
Attributes

3/12
DSAI WEB ENABLED TECHNOLOGY January 15, 2024
The caption tag

The caption tag( <caption>)


The HTML <caption> tag is used for creating table captions. It is
used with the <table> tag and represents the title of the table.
The basic tag is written like this <caption> </caption> with the
caption text inserted between the opening and closing tags.
The <caption> tag is inserted anywhere but must be between the
the <table> tag

4/12
DSAI WEB ENABLED TECHNOLOGY January 15, 2024
Example

5/12
DSAI WEB ENABLED TECHNOLOGY January 15, 2024
Output page

6/12
DSAI WEB ENABLED TECHNOLOGY January 15, 2024
Example

7/12
DSAI WEB ENABLED TECHNOLOGY January 15, 2024
Output Page

8/12
DSAI WEB ENABLED TECHNOLOGY January 15, 2024
Example using rowspan and colspan

9/12
DSAI WEB ENABLED TECHNOLOGY January 15, 2024
Output Page

10/12
DSAI WEB ENABLED TECHNOLOGY January 15, 2024
Example of cellspacing and cellpadding

11/12
DSAI WEB ENABLED TECHNOLOGY January 15, 2024
output Page

12/12
DSAI WEB ENABLED TECHNOLOGY January 15, 2024

You might also like