Advertisement
Guest User

UK_Punk_Bands_Table

a guest
Nov 9th, 2020
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.85 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="utf-8"/>
  5.     <title>Tables Task</title>
  6.  
  7.     <style>
  8.         figure {
  9.             max-width: 50%;
  10.             margin: 3em auto;
  11.             overflow-x: auto;
  12.         }
  13.  
  14.         table {
  15.             table-layout: fixed;
  16.             border-collapse: collapse;
  17.             border-style: solid none;
  18.             border-width: thin;
  19.             border-color: rgb(206,206,206);
  20.             font-size: 75%;
  21.             font-family: Verdana, Tahoma, sans-serif;
  22.         }
  23.  
  24.         tfoot {
  25.             border-top: thin solid rgb(206,206,206);
  26.         }
  27.  
  28.         thead th,
  29.         tbody th, tbody td,
  30.         tfoot th, tfoot td {
  31.             vertical-align: top;
  32.             text-align: left;
  33.             line-height: 1.8;
  34.             white-space: normal;
  35.             padding: 0.25em 0.5em;
  36.             font-variant-numeric: lining-nums tabular-nums;
  37.         }
  38.  
  39.         thead th:nth-child(2) {
  40.             min-width: 15%;
  41.             text-align: right;
  42.         }
  43.  
  44.         thead th:nth-child(3) {
  45.             min-width: 15%;
  46.             text-align: right;
  47.         }
  48.  
  49.         tbody td:nth-child(2),
  50.         tbody td:nth-child(3) {
  51.             text-align: right;
  52.         }
  53.  
  54.         tfoot th {
  55.             text-align: right;
  56.         }
  57.  
  58.         tbody tr:nth-child(2n-1) {
  59.             background-color: rgb(238,238,238);
  60.         }
  61.     </style>
  62.  
  63. </head>
  64.  
  65. <body>
  66.     <figure>
  67.         <table>
  68.             <caption>A summary of the UK's most famous punk bands</caption>
  69.             <thead>
  70.                 <tr>
  71.                     <th scope="col">Band</th>
  72.                     <th scope="col">Year <br> formed</th>
  73.                     <th scope="col">No. of <br> Albums</th>
  74.                     <th scope="col">Most famous song</th>
  75.                 </tr>
  76.             </thead>
  77.             <tbody>
  78.                 <tr>
  79.                     <th scope="row">Buzzcocks</th>
  80.                     <td>1976</td>
  81.                     <td>9</td>
  82.                     <td>Ever fallen in love (with someone you shouldn't've)</td>
  83.                 </tr>
  84.                 <tr>
  85.                     <th scope="row">The Clash</th>
  86.                     <td>1976</td>
  87.                     <td>6</td>
  88.                     <td>London Calling</td>
  89.                 </tr>
  90.                 <tr>
  91.                     <th scope="row">The Damned</th>
  92.                     <td>1976</td>
  93.                     <td>10</td>
  94.                     <td>Smash it up</td>
  95.                 </tr>
  96.                 <tr>
  97.                     <th scope="row">Sex Pistols</th>
  98.                     <td>1975</td>
  99.                     <td>1</td>
  100.                     <td>Anarchy in the UK</td>
  101.                 </tr>
  102.                 <tr>
  103.                     <th scope="row">Sham 69</th>
  104.                     <td>1976</td>
  105.                     <td>13</td>
  106.                     <td>If the kids are united</td>
  107.                 </tr>
  108.                 <tr>
  109.                     <th scope="row">Siouxsie and the Banshees</th>
  110.                     <td>1976</td>
  111.                     <td>11</td>
  112.                     <td>Hong Kong Garden</td>
  113.                 </tr>
  114.                 <tr>
  115.                     <th scope="row">Stiff Little Fingers</th>
  116.                     <td>1977</td>
  117.                     <td>10</td>
  118.                     <td>Suspect Device</td>
  119.                 </tr>
  120.                 <tr>
  121.                     <th scope="row">The Stranglers</th>
  122.                     <td>1974</td>
  123.                     <td>17</td>
  124.                     <td>No More Heroes</td>
  125.                 </tr>
  126.             </tbody>
  127.             <tfoot>
  128.                 <tr>
  129.                     <th scope="row" colspan="2">Total albums</th>
  130.                     <td colspan="2">77</td>
  131.                 </tr>
  132.             </tfoot>
  133.         </table>
  134.     </figure>
  135. </body>
  136.  
  137. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement