- Joined
- Dec 1, 2020
- Messages
- 3
- Reaction score
- 0
Hello everyone,
I posted a thread but I guess I wrote it on the archive section..
I am pretty new in this community. I am interested in Web Development. So firstly, I started learning HTML on youtube and other different platforms, 2-3 weeks ago. I am having a trouble and I do hope if I can get a help, that would be much appreciated. I have two tables in a HTML, and all I want is to style them differently. I searched it on the community but I couldn't manage it. When I do it, their unique styles becomes useless..
Here is my attempt, thank you very much in advance.
this is first table's code;
<table class="table1">
<caption >FOOD TABLE</caption>
<tr >
<th >Breakfast</th>
<td>Toast</td>
<td>Scrambled Egg</td>
<td>Cheese</td>
<td>Olive</td>
</tr>
<tr >
<th >Lunch</th>
<td>Soup</td>
<td>Pasta</td>
<td>Hamburger</td>
<td>Fish&Chips</td>
</tr>
<tr >
<th >Snack</th>
<td>Crackers</td>
<td>Chips</td>
<td>Sandwich</td>
<td>Crepe</td>
</tr>
<tr >
<th >Dinner</th>
<td>Steak</td>
<td>Mac N' Cheese</td>
<td>Clam chowder</td>
<td>Pizza</td>
</tr>
</table>
and this is 1st table style code;
table.table1,th,td,tr{border: 3px groove red; text-align: center; font-style: italic;font-family: Arial; font-size: 15px; color: teal; font-weight: bold;}
this is 2nd table
<table class="table2" cellspacing=5; cellpadding=10>
<caption>CAR TABLE</caption>
<tr>
<th >Brand</th>
<th >Type</th>
<th >Color</th>
<th >Nationality</th>
</tr>
<tr class="names">
<td>Ford</td>
<td>Mustang</td>
<td>Red</td>
<td>American</td>
</tr>
<tr class="V">
<td id="VW">Volkswagen</td>
<td>Touareg</td>
<td>Navy Blue</td>
<td>German</td>
</tr>
<tr class="A">
<td>Audi</td>
<td>Q5</td>
<td>Monsoon Gray</td>
<td>German</td>
</tr>
<tr class="F">
<td>Ferrari</td>
<td>F8 Tributo</td>
<td>Red</td>
<td>Italian</td>
</tr>
</table>
and this is 2dn table's style code;
table.table2,tr,td,th{border: 3px solid darkcyan; width:10%;height:10px; text-align: center;}
table.table2{margin-top: 5%;margin-left: 5%; }
table.table2 th{background-color: darksalmon;color:mediumvioletred;}
table.table2.names{background-color: #708090;color: tomato;font-weight: bold;font-size: 20px;}
table.table2.table.V{background-color: thistle; color:slateblue;font-size: 20px; font-weight: bolder;}
table.table2 #VW{background-color:black;}
table.table2.A{background-color: burlywood; color:green;font-size: 20px; font-weight: bolder;}
table.table2.F{background-color:hotpink; color:navy;font-size: 20px; font-weight: bolder}
table.table2 caption{font-size: 25px; color: seagreen;font-weight: bold;}
table.table2brand:hover{background-color: mintcream;}
I posted a thread but I guess I wrote it on the archive section..
I am pretty new in this community. I am interested in Web Development. So firstly, I started learning HTML on youtube and other different platforms, 2-3 weeks ago. I am having a trouble and I do hope if I can get a help, that would be much appreciated. I have two tables in a HTML, and all I want is to style them differently. I searched it on the community but I couldn't manage it. When I do it, their unique styles becomes useless..
Here is my attempt, thank you very much in advance.
this is first table's code;
<table class="table1">
<caption >FOOD TABLE</caption>
<tr >
<th >Breakfast</th>
<td>Toast</td>
<td>Scrambled Egg</td>
<td>Cheese</td>
<td>Olive</td>
</tr>
<tr >
<th >Lunch</th>
<td>Soup</td>
<td>Pasta</td>
<td>Hamburger</td>
<td>Fish&Chips</td>
</tr>
<tr >
<th >Snack</th>
<td>Crackers</td>
<td>Chips</td>
<td>Sandwich</td>
<td>Crepe</td>
</tr>
<tr >
<th >Dinner</th>
<td>Steak</td>
<td>Mac N' Cheese</td>
<td>Clam chowder</td>
<td>Pizza</td>
</tr>
</table>
and this is 1st table style code;
table.table1,th,td,tr{border: 3px groove red; text-align: center; font-style: italic;font-family: Arial; font-size: 15px; color: teal; font-weight: bold;}
this is 2nd table
<table class="table2" cellspacing=5; cellpadding=10>
<caption>CAR TABLE</caption>
<tr>
<th >Brand</th>
<th >Type</th>
<th >Color</th>
<th >Nationality</th>
</tr>
<tr class="names">
<td>Ford</td>
<td>Mustang</td>
<td>Red</td>
<td>American</td>
</tr>
<tr class="V">
<td id="VW">Volkswagen</td>
<td>Touareg</td>
<td>Navy Blue</td>
<td>German</td>
</tr>
<tr class="A">
<td>Audi</td>
<td>Q5</td>
<td>Monsoon Gray</td>
<td>German</td>
</tr>
<tr class="F">
<td>Ferrari</td>
<td>F8 Tributo</td>
<td>Red</td>
<td>Italian</td>
</tr>
</table>
and this is 2dn table's style code;
table.table2,tr,td,th{border: 3px solid darkcyan; width:10%;height:10px; text-align: center;}
table.table2{margin-top: 5%;margin-left: 5%; }
table.table2 th{background-color: darksalmon;color:mediumvioletred;}
table.table2.names{background-color: #708090;color: tomato;font-weight: bold;font-size: 20px;}
table.table2.table.V{background-color: thistle; color:slateblue;font-size: 20px; font-weight: bolder;}
table.table2 #VW{background-color:black;}
table.table2.A{background-color: burlywood; color:green;font-size: 20px; font-weight: bolder;}
table.table2.F{background-color:hotpink; color:navy;font-size: 20px; font-weight: bolder}
table.table2 caption{font-size: 25px; color: seagreen;font-weight: bold;}
table.table2brand:hover{background-color: mintcream;}