Question: 44 of 47
How to place a background for a single table cell?
You can put a background for a single table cell in two ways namely:
- Either by using HTML
- Using CSS
In this one can make use of the td tag as follows:
But the above approach is not fully compatible or does not follow the HTML specification.
This approach is much easier and simpler to follow rather the earlier one especially in case when there is a need to apply for a single cell. This is specified as follows:
Not only for a single cell is this approach easier. Even if one wishes to apply the same background for multiple cells or for several pages this approach is easier. This is because in those cases the user can specify the rule as specified above and define that rule using a CLASS attribute that making it applied to multiple cells or several pages.
Member Since Oct-2005
| Asked on: Sep 23rd, 2006
View all questions by GeekAdmin View all answers by GeekAdmin