Good, I wanted to create a table, with its titles, and where it adds content, being able to color it, just like the one shown in the image . I have only achieved what I show in the example, and when I write inside the cells they get longer, and the intention is that the cells have a fixed size, that they cover almost the entire width of the page. I imagine that css will be needed, because the tables themselves do not come out. Look what I got, thanks.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tabla</title>
</head>
<body>
<table class="egt">
<caption>Consumo de combustible de los autos a lo largo de las pruebas de manejo</caption>
<tr>
<th scope="col">Car</th>
<th>Enero</th>
<th>Febrero</th>
<th>Marzo</th>
</tr>
<tr>
<th>Chevrolet Camaro</th>
<td>1254 lts</td>
<td>1582 lts</td>
<td>685 lts</td>
</tr>
<tr>
<th>Lamborghini Aventator</th>
<td>1854 lts</td>
<td>1978 lts</td>
<td>1502 lts</td>
</tr>
</table>
</body>
</html>
You can style it with a CSS file or directly in your HTML code . The most practical thing is for CSS to create a text file with a name, for example , StyleTable with the extension .css (
estiloTabla.css
) .And add the following text inside the file:
Now you can modify font size colors to your liking.
In your html file you need to reference this file within the head
<head> aqui </head>
tags add the following line.css walkthrough
I suggest you download bootstrap for your form and table layouts from here: https://getbootstrap.com/docs/4.0/getting-started/download/
meanwhile, I leave you the structure of your table already designed but worked with bootstrap, good luck: