-
Introduction
-
Types of HTML Tags
-
HTML Document & It's different Sections
-
Requirement of HTML
-
Basic tags used in any HTML document
-
Heading Tag
-
Line Break Tag & Section Separator Tag
-
Paragraph, Bold, Italic & Underline Tag
-
Big, Small, Marquee, Subscript & Superscript Tag
-
Teletype & Strike Tag
-
Tag Attribute with Examples
-
Font Tag
-
Table Tag
-
List Tag (OL, UL & DL Tag)
-
Form Tag
-
Image Tag
-
HTML 5 Input Types
-
DHTML
-
XML
HTML
TABLE TAG
-
HTML allows us to enter the data in tabular form in a webpage.
-
It includes <TABLE>, <TR>, <TD>, <TH>, <CAPTION>, <THEAD>, <TFOOT>, etc.
-
A table is a collection of records or rows.
-
The intersection point of row and column is called “cell”.
-
Table tags:​​
​
![table.JPG](https://static.wixstatic.com/media/f7d932_9ddb4db3e7684b378c78cea25d14be71~mv2.jpg/v1/fill/w_600,h_246,al_c,q_80,usm_0.66_1.00_0.01,enc_auto/table_JPG.jpg)
Colspan:
-
This is an attribute of <TABLE> tag which is used to combine two or more columns and display them as a single column.
-
Syntax:
<th colspan=”value”> or <td colspan=”value”>
-
Example:
<th colspan=”2”>
Rowspan:
-
This is an attribute of <table> tag which is used to combine two or more rows and display them as a single row.
-
Syntax:
<th rowspan=”value”> or <td rowspan=”value”>
-
Example:
<th rowspan=”2”>
Cellpadding:
-
This is an attribute of <table> tag which is used to represent the distance between the cell border and content within a cell.
Cellspacing:​
-
This is an attribute of <table> tag which is used to represent the width of the border of a table.
Table bgcolor:
-
This attribute is used to change the background color of the table.
Border color:​
-
This attribute is used to change the border color of the table.
​
Example:
<html>
<head>
<title> TABLE </title>
</head>
<body>
<table border="1">
<caption> EMPLOYEE </caption>
​<tr>
<th colspan=”2”> NAME </th>
<th rowspan=”2”> SALARY </th>
​</tr>
​<tr>
<th> FIRST_NAME </th>
<th> LAST_NAME </th>
​</tr>
​<tr>
<td> SHREYASH </td>
<td> PRADHAN </td>
<td> 50000 </td>
​</tr>
​<tr>
<td> HAPPY </td>
<td> SINGH </td>
<td> 48000 </td>
</tr>
​<tr>
<td> RAKESH </td>
<td> ROSHAN </td>
<td> 46000 </td>
</tr>
​<tr>
<td> ROHAN </td>
<td> PRADHAN </td>
<td> 98000 </td>
</tr>
</table>
</body>
</html>
​
OUTPUT:
​
![tab.JPG](https://static.wixstatic.com/media/f7d932_a115498242444100ab5c48933bf561c8~mv2.jpg/v1/fill/w_600,h_380,al_c,q_80,usm_0.66_1.00_0.01,enc_auto/tab_JPG.jpg)
Related Topics
-
Introduction
-
Types of HTML Tags
-
HTML Document & It's different Sections
-
Requirement of HTML
-
Basic tags used in any HTML document
-
Heading Tag
-
Line Break Tag & Section Separator Tag
-
Paragraph, Bold, Italic & Underline Tag
-
Big, Small, Marquee, Subscript & Superscript Tag
-
Teletype & Strike Tag
-
Tag Attribute with Examples
-
Font Tag
-
Table Tag
-
List Tag (OL, UL & DL Tag)
-
Form Tag
-
Image Tag
-
HTML 5 Input Types
-
DHTML
-
XML