GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Web  >  Html
Go To First  |  Previous Question  |  Next Question 
 Html  |  Question 4 of 40    Print  
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

HTML Approach:

In this one can make use of the td tag as follows:

<td background="exforsys.gif">
text
</td>

But the above approach is not fully compatible or does not follow the HTML specification.

CSS Approach:
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:

<td style="background: url(exforsys.gif) #fff; color: #555;">
...
</td>

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.




  
Total Answers and Comments: 1 Last Update: July 30, 2007     Asked by: GeekAdmin 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 30, 2007 13:44:25   #1  
Sujatars Member Since: December 2006   Contribution: 217    

RE: How to place a background for a single table cell?...

You can add background to a single cell

<td bgcolor="#000000">


 
Is this answer useful? Yes | No

 Related Questions

iframe is used for creating an inline or floating frame. As most of know frames are mainly used to structure the page or for placing a menu bar on the side and so on. But iframe is used in a different 
Latest Answer : IFrame is used for creating a inline frame or floating frame that contains another document. ...

You can put a background for a single table cell in two ways namely: Either by using HTML Using CSS HTML Approach: In this one can make use of the td tag as follows:  
Latest Answer : You can add background to a single cell ...

Cell Padding: Cell padding is used for formatting purpose which is used to specify the space needed between the edges of the cells and also in the cell contents. The general format of specifying cell 
Latest Answer : Cell Spacing is used to set space between different table cellsCell Padding is used for formatting the space  needed between the edges of the cell and the content of the cell. ...

Latest Answer : If it is href linka:link {font-family:Arial, Helvetica, sans-serif; color:#372a2a; text-decoration:none;}a:visited {font-family:Arial, Helvetica, sans-serif; color:#372a2a; text-decoration:none;}a:hover {font-family:Arial, Helvetica, sans-serif; color:#372a2a; ...
Read Answers (2) | Asked by : timmy

Latest Answer : you have to use in to the thanks sandy ...
Read Answers (3) | Asked by : Robert

Is it possible in HTML to add more than one submit button having different actions in a single form?
Read Answers (2) | Asked by : Ammu


 Sponsored Links

 
Related Articles

ODP.NET - Populating a Dataset with a Single Data Table

ODP NET Populating a Dataset with a Single Data Table A dataset is simply a group of data tables These data tables can be identified with their own unique names within a dataset You can also add relations between data tables available in a dataset mosgoogle The following code gives you the details o
 

ODP.NET - Retrieving a Single Row of Information Using OracleDataAdapter

ODP NET Retrieving a Single Row of Information Using OracleDataAdapter In the previous example we worked with a set of rows in the DataTable object Now we shall work with a particular row using the DataTable object The following code accepts an employee number from the user and gives you the details
 

jQuery Table Row Finished Code

jQuery Table Row Finished Code The Finished Code Our second example page has demonstrated table row striping highlighting tooltips collapsing expanding and filtering Taken together the JavaScript code for this page is mosgoogle geshibot lang php&quot; document ready function var highlighted
 

jQuery Expanding and Collapsing Table Rows

jQuery Expanding and Collapsing Table Rows The expanding and collapsing behavior added earlier also conflicts with our filters If a section is collapsed and a new filter is chosen then the matching items are displayed even if in the collapsed section Conversely if the table is filtered and a section
 

jQuery Table Row Filtering

jQuery Table Row Filtering Earlier we examined sorting and paging as techniques for helping users focus on relevant portions of a table s data We saw that both could be implemented either with server side technology or with JavaScript Filtering completes this arsenal of data arrangement strategies B
 

jQuery Collapsing and Expanding Table Rows

jQuery Collapsing and Expanding Table Rows When large sets of data are grouped in tables as each year s set of articles are in our News page collapsing or hiding a section s contents can be a convenient way to get a broad view of all of the table s data without having to scroll so much mosgoogle To
 

jQuery Table Manipulation

Learning jQuery Table Manipulation By Karl Swedberg Jonathan Chaffer Better Interaction Design and Web Development with Simple JavaScript Techniques Learning jQuery packtpub com jQuery book Table Manipulation Let em wear gaudy colors Or avoid display Devo Wiggly World&quot; In the first si
 

SQL Table Commands

SQL Table Commands Overview As mentioned previously in this series of SQL articles, databases are primarily composed of tables. The &ldquo;columns and rows&rdquo; structure of the table allows data to be efficiently inserted, manipulated, updated, and deleted from the database. The three mos
 

The Interview Snafu

How to turn someone else&rsquo;s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won&rsquo;t get over the line without a polished, prof
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape