+ 3

I need help with colspan colour......

#Attributes

13th Apr 2021, 11:20 AM
Lil MAYHEM99
Lil MAYHEM99 - avatar
7 Answers
+ 7
<body> <table style="border-collapse:collapse;"> <thead> <tr> <th colspan="2">Famous Monsters by Birth Year</th> </tr> <tr style="border-bottom:1px solid black;"> <th style="padding:5px;"><em>Famous Monster</em></th> <th style="padding:5px;border-left:1px solid black;"><em>Birth Year</em></th> </tr> </thead> <tbody> <tr> <td style="padding:5px;">King Kong</td> <td style="padding:5px;border-left:1px solid black;">1933</td> </tr> <tr> <td style="padding:5p
21st Nov 2021, 3:44 AM
Vaibhav
Vaibhav - avatar
+ 5
colspan doesn't have much to do with colour. If you have a td or th, colspan will let you span multiple columns. colpsan is more related to size of your td or th element than it is to any colour. Regarding colour, the following CSS properties can be used depending on what you want the colour applied to: background-color border-color color Note that colspan is an HTML attribute but those colour properties are from CSS.
13th Apr 2021, 12:45 PM
Josh Greig
Josh Greig - avatar
+ 4
To colour table cell with colspan attribute, use selector td[colspan] https://code.sololearn.com/WP6YOTuiipPQ/?ref=app
13th Apr 2021, 1:34 PM
CalviŐČ
CalviŐČ - avatar
+ 1
Ok...got it thanks
13th Apr 2021, 12:47 PM
Lil MAYHEM99
Lil MAYHEM99 - avatar
+ 1
Thanks Calvin
14th Apr 2021, 5:49 AM
Lil MAYHEM99
Lil MAYHEM99 - avatar
+ 1
<html> <head> <title> salary_table</title> <style> td[colspan] { background:blue; } </style> </head> <body> ............................. .... ............ ........... ....... ................. .......... ....... ....... </body> </html> [If you do colspan color, you will use "style" tag in the "head" tag. ]
15th Apr 2021, 4:41 AM
Md. Rafeul Azad Rafe
14th Apr 2021, 2:21 AM
Andrés Guevara
Andrés Guevara - avatar