No replies
ricardo1992
ricardo1992's picture
Offline
newbie
Last seen: 9 weeks 5 days ago
Timezone: GMT+2
Joined: 2022-09-20
Posts: 1
Points: 2

Hey guys,

im kinda new to HTML and CSS.

now i made a table with 4x4 cells in html, so far so good.

Goku (kakarot)
Goku
Goten
Goten

Vegeta
Vegeta
Broly
Broly

Gohan (beast)
Gohan
Bardock
Bardock

Trunks
Trunks
Paragus
Paragus

and now i want to give different cells different background colours with CSS, i gave the lines a different id like Td1 to td 4 in my other file, and i made a css style sheet with the following code:

h1{
color: black;
background-color: red;
}

td1 {
color: blue;
background-color: rgb(255, 99, 71);
}

td2 {
color: red;
background-color: green;
}

td3 {
color: pink;
background-color: gray;
}

td4 {
color: blue;
background-color: black;
}

td5 {
color: black;
background-color: Orange;
}

footer {
color: black;
background-color: purple;
}

the header and footer are having different colours but i cant give the cells in my table different colours, am i missing something?

help me guys what am i doing wrong