Computer problems,Computer help
*AX SOFT>>>Programming & Design

How do i change the text color of the letters inside a table (HTML)?


<table>
<tr>
<td> </td>
</tr> like that.. but i dnt knw how to change the colors it always remain black. help please ASAP.. thanks a lot!

Hi there,

Add style to your <td> tag...

<td style="color: #FF0000;">

Or you can put the text in between div tags...

<td>
<div style="color: #FF0000;">Text goes here.</div>
</td>

Good luck with it!

You're very welcome! Report It

<table border=1 align=center>
<tr>
<td bgcolor=Beige>
<font color="red" size="4">row1</font>
</td>
or
<td style="color: red">row1</td>
</tr>
</table>

The first 2 answers above will work but the 2nd is depreciated and the 1st is cumbersome. Add a id attribute to the table you want to change the font of:

<table id="mytable">
<tr>
<td>Stuff</td>
</tr>
</table>

Then, create a style sheet in the <head> tag of your page:

<style type="text/css">

#mytable
{color: blue}

</style>

I know this seems like a lot but using CSS (cascading style sheets) is FAR better than any other option. Go to htmldog.com for more info on CSS.

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • Arrange the following in descending order?

    each letter represents 4 bits. So any number that begins with 8-F is negative You can convert the numbers like so hex binary 8 1000 9 1001 A 1010 B 1011 ...

  • Can <tr> rows be styled or do you have to style seperate <td> cells?

    Yes, table rows, can be styled, but you can;t just specify any type of style. Then again, this is true for all HTML elements. I know you can specify a background for a table row, but not a borde...

  • Autorun function?

    All you need to do is put an autorun.inf file in the root. Check the source. Note that autorun is a request, not a demand. Users may have their computer set up to disregard autoruns.

    ...
  • Here in Javascript version. Anyone can change it to vbscript?

    vbscript isn't really a good choice as it is server side while javascript is client side. You would need a big rework of this and turn it into a form. So you'd end up with a clunky for...

  • How do I make fractions on the?

    Go to insert, object (make sure create new) tab is clicked, then scroll down to microsoft equation. if it's not there, then u might have to install that part off of the cd

    ...
  • Computers....?

    go to start then contol panel. select internet options , now a second screen will appear look all the way down to the bottom one and select delete all "web Browseing history pass-word etc.&quo...

  • Images on my website can only be viewed in Safari.....why!?

    I'll assume that you actually did upload the image file as well as the HTML, since you're following the tutorial. Check the HTML code for errors. Does your image tag look like this? .....

  • Can someone please tell me what a background url is? thanks a ton! 8)?

    Background URL refers to CSS styling, either inline, embedded or external css file, to pull an image to be used as a background within the container used. For a complete page bg image and using th...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster