Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8"/>
- <title>Tables Task</title>
- <style>
- figure {
- max-width: 50%;
- margin: 3em auto;
- overflow-x: auto;
- }
- table {
- table-layout: fixed;
- border-collapse: collapse;
- border-style: solid none;
- border-width: thin;
- border-color: rgb(206,206,206);
- font-size: 75%;
- font-family: Verdana, Tahoma, sans-serif;
- }
- tfoot {
- border-top: thin solid rgb(206,206,206);
- }
- thead th,
- tbody th, tbody td,
- tfoot th, tfoot td {
- vertical-align: top;
- text-align: left;
- line-height: 1.8;
- white-space: normal;
- padding: 0.25em 0.5em;
- font-variant-numeric: lining-nums tabular-nums;
- }
- thead th:nth-child(2) {
- min-width: 15%;
- text-align: right;
- }
- thead th:nth-child(3) {
- min-width: 15%;
- text-align: right;
- }
- tbody td:nth-child(2),
- tbody td:nth-child(3) {
- text-align: right;
- }
- tfoot th {
- text-align: right;
- }
- tbody tr:nth-child(2n-1) {
- background-color: rgb(238,238,238);
- }
- </style>
- </head>
- <body>
- <figure>
- <table>
- <caption>A summary of the UK's most famous punk bands</caption>
- <thead>
- <tr>
- <th scope="col">Band</th>
- <th scope="col">Year <br> formed</th>
- <th scope="col">No. of <br> Albums</th>
- <th scope="col">Most famous song</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th scope="row">Buzzcocks</th>
- <td>1976</td>
- <td>9</td>
- <td>Ever fallen in love (with someone you shouldn't've)</td>
- </tr>
- <tr>
- <th scope="row">The Clash</th>
- <td>1976</td>
- <td>6</td>
- <td>London Calling</td>
- </tr>
- <tr>
- <th scope="row">The Damned</th>
- <td>1976</td>
- <td>10</td>
- <td>Smash it up</td>
- </tr>
- <tr>
- <th scope="row">Sex Pistols</th>
- <td>1975</td>
- <td>1</td>
- <td>Anarchy in the UK</td>
- </tr>
- <tr>
- <th scope="row">Sham 69</th>
- <td>1976</td>
- <td>13</td>
- <td>If the kids are united</td>
- </tr>
- <tr>
- <th scope="row">Siouxsie and the Banshees</th>
- <td>1976</td>
- <td>11</td>
- <td>Hong Kong Garden</td>
- </tr>
- <tr>
- <th scope="row">Stiff Little Fingers</th>
- <td>1977</td>
- <td>10</td>
- <td>Suspect Device</td>
- </tr>
- <tr>
- <th scope="row">The Stranglers</th>
- <td>1974</td>
- <td>17</td>
- <td>No More Heroes</td>
- </tr>
- </tbody>
- <tfoot>
- <tr>
- <th scope="row" colspan="2">Total albums</th>
- <td colspan="2">77</td>
- </tr>
- </tfoot>
- </table>
- </figure>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement