martes, 14 de diciembre de 2021

Solución CSS12

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Ejercicio formatear tabla</title>
<style type="text/css">
table {
  border: 1px solid #333;
  border-collapse: collapse;
  text-align: center;
  margin:0 auto;
 
}
table th {
  background:#CCC;
  padding: 0 .3em;
  text-align: center;
}
table th, table, td {
  border: 1px solid #333;
  line-height: 2em;
}
.par {
  background-color:#CCC;
}
table tr:hover {
  background:linear-gradient(red,blue);
}

</style>
</head>

<body>
<table>
  <tr>
    <th>Pa&iacute;s</th>
    <th>Proyecci&oacute;n 07/2015</th>
    <th>% Mundial</th>
    <th>Censo</th>
    <th>Fecha</th>
  </tr>
  <tr>
    <th class="fila euro">China</th>
    <td>1&nbsp;370&nbsp;793&nbsp;000</td>
    <td>18,83</td>
    <td>1&nbsp;370&nbsp;134&nbsp;000</td>
    <td>31/05/2015</td>
  </tr>
  <tr class="par">
    <th scope="row" class="fila dolar">India</th>
    <td>1&nbsp;299&nbsp;499&nbsp;000</td>
    <td>17,85</td>
    <td>1&nbsp;210&nbsp;854&nbsp;977</td>
    <td>1/03/2011</td>
  </tr>
  <tr>
    <th scope="row" class="fila libra">USA</th>
    <td>321&nbsp;234&nbsp;000</td>
    <td>4,41</td>
    <td>320&nbsp;984&nbsp;000</td>
    <td>31/05/2015</td>
  </tr>
  <tr class="par">
    <th scope="row" class="fila yen">Indonesia</th>
    <td>255&nbsp;462&nbsp;000</td>
    <td>3,51</td>
    <td>255&nbsp;461&nbsp;700</td>
    <td>2015</td>
  </tr>
  <tr>
    <th scope="row" class="fila yen">Brasil</th>
    <td>204&nbsp;519&nbsp;000</td>
    <td>2,81</td>
    <td>204&nbsp;324&nbsp;000</td>
    <td>31/05/2015</td>
  </tr>
  <tr class="par">
    <th scope="row" class="fila yen">Pakist&aacute;n</th>
    <td>191&nbsp;785&nbsp;000</td>
    <td>2,63</td>
    <td>190&nbsp;323&nbsp;000</td>
    <td>31/05/2015</td>
  </tr>
  <tr>
    <th scope="row" class="fila yen">Nigeria</th>
    <td>184&nbsp;264&nbsp;000</td>
    <td>2,53</td>
    <td>174&nbsp;000&nbsp;000</td>
    <td>2013</td>
  </tr>
  <tr class="par">
    <th scope="row" class="fila yen">Banglad&eacute;s</th>
    <td>158&nbsp;762&nbsp;000</td>
    <td>2,18</td>
    <td>158&nbsp;593&nbsp;000</td>
    <td>31/05/2015</td>
  </tr>
  <tr>
    <th scope="row" class="fila yen">Rusia</th>
    <td>144&nbsp;031&nbsp;000</td>
    <td>1,98</td>
    <td>146&nbsp;267&nbsp;288</td>
    <td>1/01/2015</td>
  </tr>
  <tr class="par">
    <th scope="row" class="fila yen">Jap&oacute;n</th>
    <td>126&nbsp;806&nbsp;000</td>
    <td>1,74</td>
    <td>126&nbsp;880&nbsp;000</td>
    <td>1/01/2015</td>
  </tr>
</table>

</body>
</html>