I need help with colspan colour...... | Sololearn: Learn to code for FREE!

+4

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

#Attributes

4/13/2021 11:20:04 AM

Keith

6 Answers

New Answer

+4

To colour table cell with colspan attribute, use selector td[colspan] https://code.sololearn.com/WP6YOTuiipPQ/?ref=app

+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.

+1

Ok...got it thanks

+1

Thanks Calvin

+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. ]

-2

https://code.sololearn.com/W3A8a21A25A1/?ref=app