Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style type="text/css">
- thead {color:green}
- tbody {color:blue}
- tfoot {color:red}
- </style>
- </head>
- <body>
- <center>
- <table border=1 bgcolor="white">
- <caption border><h3>Table 01</h3></caption>
- <tr>
- <th>Name</th>
- <td>Bill Gates</th>
- </tr>
- <tr>
- <th rowspan="2">Telephone</th>
- <td>555 777 999</td>
- </tr>
- </tr>
- <tr>
- <td>888 858 6698</td>
- </tr>
- </tr>
- </table>
- </br>
- </br>
- <table border=1 bgcolor="white">
- <caption><h3>Table 02</h3></caption>
- <tr>
- <th>Name</th>
- <th colspan="2">Telephone</th>
- </tr>
- <tr>
- <td>Bill Gates</th>
- <td>555 777 999</td>
- <td>888 858 6698</td>
- </tr>
- </tr>
- </tr>
- </table>
- <table border=1 bgcolor="white">
- <caption><h3>Table 03 (using thead tfoot and tbody</h3></caption>
- <tfoot>
- <tr>
- <td>New Footer</th>
- <td>582 696 5585</td>
- </tr>
- </tfoot>
- <thead>
- <tr>
- <th>Name</th>
- <th>Telephone</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Bill Gates</th>
- <td>555 777 999</td>
- </tr>
- </tbody>
- </table>
- <table border=1 bgcolor="white">
- <caption><h3>Table Column wise color</h3></caption>
- <colgroup>
- <col span="1" style="background-color:red">
- <col span="1" style="background-color:green">
- <col span="1" style="background-color:yellow">
- <col span="1" style="background-color:pink">
- </colgroup>
- <tr>
- <th>Name</th>
- <th>Telephone</th>
- <th>Test</th>
- <th>Demo</th>
- </tr>
- <tr>
- <td>Bill Gates</th>
- <td>555 777 999</td>
- <td>ABCD</td>
- <td>PQRS</td>
- </tr>
- <tr>
- <td>New Footer</th>
- <td>582 696 5585</td>
- <td>DEFG</td>
- <td>Last One</td>
- </tr>
- </table>
- <html>
- <body>
- <center>
- <table border=2 bordercolor="blue">
- <tr>
- <th rowspan="2">Empno</th>
- <th colspan="4">Marks</th>
- </tr>
- <tr>
- <td>Sec A</td>
- <td>Sec B</td>
- <td>Sec C</td>
- <td>Total</td>
- </tr>
- </tr>
- </tr>
- <tr>
- <td>1</th>
- <td>1</th>
- <td>2</td>
- <td>3</td>
- <td>6</td>
- </tr>
- </tr>
- <tr>
- <td>2</th>
- <td>4</th>
- <td>5</td>
- <td>6</td>
- <td>15</td>
- </tr>
- </tr>
- <tr>
- <td>3</th>
- <td>7</th>
- <td>8</td>
- <td>9</td>
- <td>24</td>
- </tr>
- </tr>
- </tr>
- </table>
- </center>
- </body>
- </html>
- </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement