KEMBAR78
How to add table using HTML? HTML table styles. | PDF
HTML TABLE
<table>.....</table>
<tr>.....</tr>
<th>.....</th>
<td>.....</td>
table styles
Class: FY B. Tech Structural Engineering
Subject: IT for Engineers
Prof. Jape Anuja Sanjay
Assistant Professor,
Department of Structural Engineering,
Sanjivani College of Engineering. Kopargaon
Email: japeanujast@sanjivani.org.in
Tag Description
<table> Defines a table
<th> Defines a header cell in a table
<tr> Defines a row in a table
<td> Defines a cell in a table
<caption> Defines a table caption
<colgroup> Specifies a group of one or more columns in a table for formatting
<col> Specifies column properties for each column within a <colgroup> element
<thead> Groups the header content in a table
<tbody> Groups the body content in a table
<tfoot> Groups the footer content in a table
HTML Table Tags
Ref:https://www.w3schools.com/
<!DOCTYPE html>
<html>
<style>
table, th, td { border:1px solid black;}
</style>
<body>
<h2>A basic HTML table</h2>
<table style="width:100%">
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
</table>
</body>
</html>
Ref:https://www.w3schools.com/
HTML Table Borders
table, th, td {
border: 1px solid black;
}
Collapsed Table Borders
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
Style Table Borders
table, th, td {
border: 1px solid white;
border-collapse: collapse;
}
th, td {
background-color: #96D4D4;
}
Ref:https://www.w3schools.com/
Round Table Borders
table, th, td {
border: 1px solid black;
border-radius: 10px;
}
th, td {
border: 1px solid black;
border-radius: 10px;
}
Ref:https://www.w3schools.com/
border-style property of table
th, td {
border-style: dotted;
}
th, td {
border-color: #96D4D4;
}
border-color property of table
Ref:https://www.w3schools.com/

How to add table using HTML? HTML table styles.

  • 1.
    HTML TABLE <table>.....</table> <tr>.....</tr> <th>.....</th> <td>.....</td> table styles Class:FY B. Tech Structural Engineering Subject: IT for Engineers Prof. Jape Anuja Sanjay Assistant Professor, Department of Structural Engineering, Sanjivani College of Engineering. Kopargaon Email: japeanujast@sanjivani.org.in
  • 2.
    Tag Description <table> Definesa table <th> Defines a header cell in a table <tr> Defines a row in a table <td> Defines a cell in a table <caption> Defines a table caption <colgroup> Specifies a group of one or more columns in a table for formatting <col> Specifies column properties for each column within a <colgroup> element <thead> Groups the header content in a table <tbody> Groups the body content in a table <tfoot> Groups the footer content in a table HTML Table Tags Ref:https://www.w3schools.com/
  • 3.
    <!DOCTYPE html> <html> <style> table, th,td { border:1px solid black;} </style> <body> <h2>A basic HTML table</h2> <table style="width:100%"> <tr> <th>Company</th> <th>Contact</th> <th>Country</th> </tr> <tr> <td>Alfreds Futterkiste</td> <td>Maria Anders</td> <td>Germany</td> </tr> <tr> <td>Centro comercial Moctezuma</td> <td>Francisco Chang</td> <td>Mexico</td> </tr> </table> </body> </html> Ref:https://www.w3schools.com/
  • 4.
    HTML Table Borders table,th, td { border: 1px solid black; } Collapsed Table Borders table, th, td { border: 1px solid black; border-collapse: collapse; } Style Table Borders table, th, td { border: 1px solid white; border-collapse: collapse; } th, td { background-color: #96D4D4; } Ref:https://www.w3schools.com/
  • 5.
    Round Table Borders table,th, td { border: 1px solid black; border-radius: 10px; } th, td { border: 1px solid black; border-radius: 10px; } Ref:https://www.w3schools.com/
  • 6.
    border-style property oftable th, td { border-style: dotted; } th, td { border-color: #96D4D4; } border-color property of table Ref:https://www.w3schools.com/