The document discusses HTML tables and their structure and attributes. It explains that HTML tables allow arranging data into rows and columns using <table>, <tr>, and <td> tags. It then describes various table attributes like border, width, height, bgcolor, background, frame, align, valign, and rules that can customize a table's appearance and layout.
2. Table
“Table is Combination of Rows and Columns,
Which intersect each other and create cell where
user store the value”
Row/Tuple
Column
Cell
Intersect
4. HTML tables allow web developers to
arrange data into rows and columns.
Html table has following element
1. < table > :The <table> tag defines an HTML table.
2. < tr > : Each table row is defined with a <tr> tag
3. < th > / <td> : <td> and <th> tags which defined the
table’s headers and data cells
“Tables are useful for the general display of tabular data”
8. Table Attribute
The table tag begins the process of building a
table. It carries a long list of attributes ,
including
1. Border
2. Bordercolor
3. Width
4. Height
5. BGColor
6. BackGround
7. Frame
8. Rules
9. Align
10. Valign
9. 1. Border Attribute
A table’s border is specified through BORDER
attribute.(Border = size)
<table>
<tr>
<td> Roll No </td>
<td> Name </td>
</tr>
<tr>
<td> 1 </td>
<td> Komal </td>
</tr>
</table>
<table Border = “ 1 ” >
10. 2. BorderColor Attribute
A table’s bordercolor attribute is used to specify the
color of table’s border.(Bordercolor = “Any color”)
<table Border = “ 1 ” >
<tr>
<td> Roll No </td>
<td> Name </td>
</tr>
<tr>
<td> 1 </td>
<td> Komal </td>
</tr>
</table>
<table Border = “ 1 ” Bordercolor = “red”>
11. 3. Width and Height Attribute
The width property specifies the width of an
element, and the height property specifies the
height of an element.
< Table width=“50%” or Height = “50%”>
12. <table Border = “ 1 ” >
<tr>
<td> Roll No </td>
<td> Name </td>
</tr>
<tr>
<td> 1 </td>
<td> Komal </td>
</tr>
</table>
<table Border = “ 1 ” width=“50%” or Height = “50%” >
13. BGColor
We can set background color for whole
table or just for one cell
Syntax
<table
bgcolor="color_name”>
18. Align
Align attribute of Table can positioning
Tables and their contents in relation to other
elements on the Web page.
Align attributes can be set in two levels
1. Table Alignment
2. The alignment of content inside the
Table Cells.
21. Valign
The purpose of the HTML valign attribute is to
define the vertical alignment of the content of a
table cell.
Value Description
top Sets the vertical alignment of cell content top.
middle Sets the vertical alignment of cell content center.
bottom Sets the vertical alignment of cell content bottom.
23. Frame
The frame Attribute is used to specify the visibility of
outside borders.
Syntax
<table frame="value">
24. Attribute Values
void: It is used to hide the outside border.
above: It is used to display the top outside border.
below: It is used to display the bottom outside border.
hsides: It is used to display the top and bottom outside border.
vsides: It is used to display the left and right outside border.
lhs: It is used to display the left outside border.
rhs: It is used to display the right outside border.
box: It is used to display all sides outside border.
border: It is used to display all outside border.
28. Rules
The rules Attribute is used to specify the
which parts of the inside borders that should
be visible.
29. Syntax
<table rules="value">
Attribute Values
•none : It does not create any lines.
•Groups : It create lines between row and column
groups.
•Rows : It creates line between the rows.
•Cols : It creates line between the columns.
•All : It creates line between the rows and
columns.