Alguien me puede ayudar o indicar como crear esta tabla en html
-
2Tienes el Html hecho? Si proporcionas el html, sera mas rapido para nosotros ayudarte con el css– Sonia Toledoel 19 sep. 2018 a las 23:38
-
1Hola Eduard, recuerda que siempre que hagas una pregunta debes saber Cómo crear un ejemplo mínimo, completo y verificable. Es importante que ya tengas por lo menos cierta parte del código ya hecho! aquí te dejo, Como preguntar– Dєηyη Crawfordel 20 sep. 2018 a las 0:09
Añade un comentario
|
2 respuestas
Tu table de la imagen puedes hacerla en html asi:
<table border="1">
<tr>
<th rowspan="3">Store Location</th>
<th rowspan="3">Gender</th>
</tr>
<tr>
<th colspan="3">2013</th>
<th colspan="3">2014</th>
</tr>
<tr>
<th>Q1</th>
<th>Q2</th>
<th>Q3</th>
<th>Q1</th>
<th>Q2</th>
<th>Q3</th>
</tr>
<tr>
<th rowspan="2">Boston</th>
<th>Male</th>
<td>17713</td>
<td>17713</td>
<td>17713</td>
<td>17713</td>
<td>17713</td>
<td>17713</td>
</tr>
<tr>
<th>Female</th>
<td>43761</td>
<td>43761</td>
<td>43761</td>
<td>43761</td>
<td>43761</td>
<td>43761</td>
</tr>
<tr>
<th rowspan="2">Los Angeles</th>
<th>Male</th>
<td>17713</td>
<td>17713</td>
<td>17713</td>
<td>17713</td>
<td>17713</td>
<td>17713</td>
</tr>
<tr>
<th>Female</th>
<td>43761</td>
<td>43761</td>
<td>43761</td>
<td>43761</td>
<td>43761</td>
<td>43761</td>
</tr>
<tr>
<th rowspan="2">New York</th>
<th>Male</th>
<td>17713</td>
<td>17713</td>
<td>17713</td>
<td>17713</td>
<td>17713</td>
<td>17713</td>
</tr>
<tr>
<th>Female</th>
<td>43761</td>
<td>43761</td>
<td>43761</td>
<td>43761</td>
<td>43761</td>
<td>43761</td>
</tr>
</table>
esta bien para eso debes en tus header usar rowspan en las primeras columnas eso unira las celdas y luego colspan para unir las columnas en los años aqui te dejo el codigo:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<table border="1">
<thead>
<tr>
<td rowspan="2">location store</td>
<td rowspan="2">gender</td>
<td colspan="3">2013</td><td colspan="3">2014</td><td colspan="3">2015</td></tr>
<tr>
<td>q1</td><td>q2</td><td>q3</td>
<td>q1</td><td>q2</td><td>q3</td>
<td>q1</td><td>q2</td><td>q3</td>
</tr>
</thead>
<tbody>
<td>valor</td>
<td>valor</td>
<td>valor</td>
<td>valor</td>
<td>valor</td>
<td>valor</td>
<td>valor</td>
<td>valor</td>
<td>valor</td>
<td>valor</td>
<td>valor</td>
</tbody>
</table>
</body>
</html>