[html] How do I change the font color in an html table?

How do I change the font color in an html table?

<table>
<tbody>
<tr>
<td>
<select name="test">
<option value="Basic">Basic : $30.00 USD - yearly</option>
<option value="Sustaining">Sustaining : $60.00 USD - yearly</option>
<option value="Supporting">Supporting : $120.00 USD - yearly</option>
</select>
</td>
</tr>
</tbody>
</table>

I have tried

<span style="color: #0000ff;"> 
</span> 

in multiple locations ... which doesn't work.

This question is related to html fonts colors

The answer is


<table>
<tbody>
<tr>
<td>
<select name="test" style="color: red;">
<option value="Basic">Basic : $30.00 USD - yearly</option>
<option value="Sustaining">Sustaining : $60.00 USD - yearly</option>
<option value="Supporting">Supporting : $120.00 USD - yearly</option>
</select>
</td>
</tr>
</tbody>
</table>

Something like this, if want to go old-school.

<font color="blue">Sustaining : $60.00 USD - yearly</font>

Though a more modern approach would be to use a css style:

<td style="color:#0000ff">Sustaining : $60.00 USD - yearly</td>

There are of course even more general ways to do it.


if you need to change specific option from the select menu you can do it like this

option[value="Basic"] {
  color:red;
 }

or you can change them all

select {
  color:red;
}

table td{
  color:#0000ff;
}

<table>
  <tbody>
    <tr>
    <td>
      <select name="test">
        <option value="Basic">Basic : $30.00 USD - yearly</option>
        <option value="Sustaining">Sustaining : $60.00 USD - yearly</option>
        <option value="Supporting">Supporting : $120.00 USD - yearly</option>
      </select>
    </td>
    </tr>
  </tbody>
</table>

Try this:

 <html>
    <head>
        <style>
            select {
              height: 30px;
              color: #0000ff;
            }
        </style>
    </head>
    <body>
        <table>
            <tbody>
                <tr>
                    <td>
                        <select name="test">
                            <option value="Basic">Basic : $30.00 USD - yearly</option>
                            <option value="Sustaining">Sustaining : $60.00 USD - yearly</option>
                            <option value="Supporting">Supporting : $120.00 USD - yearly</option>
                        </select>
                    </td>
                </tr>
            </tbody>
        </table>
    </body>
</html>

Questions with html tag:

Embed ruby within URL : Middleman Blog Please help me convert this script to a simple image slider Generating a list of pages (not posts) without the index file Why there is this "clear" class before footer? Is it possible to change the content HTML5 alert messages? Getting all files in directory with ajax DevTools failed to load SourceMap: Could not load content for chrome-extension How to set width of mat-table column in angular? How to open a link in new tab using angular? ERROR Error: Uncaught (in promise), Cannot match any routes. URL Segment Angular 6: saving data to local storage Vue.js get selected option on @change Bootstrap 4 multiselect dropdown How to add bootstrap in angular 6 project? Angular 5 Button Submit On Enter Key Press Angular 5, HTML, boolean on checkbox is checked How to render string with html tags in Angular 4+? bootstrap 4 file input doesn't show the file name How can I execute a python script from an html button? Bootstrap 4: responsive sidebar menu to top navbar Stylesheet not loaded because of MIME-type Force flex item to span full row width Failed to load resource: the server responded with a status of 404 (Not Found) css Change arrow colors in Bootstraps carousel Bootstrap 4 Dropdown Menu not working? CSS Grid Layout not working in IE11 even with prefixes How to prevent page from reloading after form submit - JQuery Centering in CSS Grid Detecting real time window size changes in Angular 4 Angular 4 img src is not found (change) vs (ngModelChange) in angular Bootstrap 4: Multilevel Dropdown Inside Navigation Align the form to the center in Bootstrap 4 How to style a clicked button in CSS How do I change the font color in an html table? Redirecting to a page after submitting form in HTML Load json from local file with http.get() in angular 2 display: flex not working on Internet Explorer Scroll to element on click in Angular 4 How to extract svg as file from web page force css grid container to fill full screen of device How does the "position: sticky;" property work? HTML5 Video autoplay on iPhone Disable button in angular with two conditions? CSS hide scroll bar, but have element scrollable CSS grid wrapping How to load image (and other assets) in Angular an project? Flask - Calling python function on button OnClick event How can I make Bootstrap 4 columns all the same height? Wrapping a react-router Link in an html button

Questions with fonts tag:

How to import a new font into a project - Angular 5 Font Awesome 5 font-family issue How do I change the font color in an html table? How to add fonts to create-react-app based projects? Changing fonts in ggplot2 Webpack "OTS parsing error" loading fonts Failed to decode downloaded font Proper MIME type for .woff2 fonts Link a .css on another folder How can I fix the 'Missing Cross-Origin Resource Sharing (CORS) Response Header' webfont issue? What is the default font of Sublime Text? How do I make an attributed string using Swift? How can I change the Bootstrap default font family using font from Google? Is there such a thing as min-font-size and max-font-size? How to vertically align text with icon font? How to change font in ipython notebook How to change fonts in matplotlib (python)? How do I download/extract font from chrome developers tools? iOS change navigation bar title font and color GLYPHICONS - bootstrap icon font hex value Valid values for android:fontFamily and what they map to? Font Awesome icon inside text input element How to Change Font Size in drawString Java How can I use Google's Roboto font on a website? How to change font size in html? How do I set the default font size in Vim? How to format font style and color in echo Font.createFont(..) set color and size (java.awt.Font) Downloading a Google font and setting up an offline site that uses it Convert or extract TTC font to TTF - how to? How to import Google Web Font in CSS file? What is the HTML unicode character for a "tall" right chevron? How can I use custom fonts on a website? How do I use .woff fonts for my website? Using Helvetica Neue in a Website How to embed fonts in CSS? Is there any "font smoothing" in Google Chrome? Webfont Smoothing and Antialiasing in Firefox and Opera How to set String's font size, style in Java using the Font class? UILabel font size? Easiest way to change font and font size Applying a single font to an entire website with CSS Using custom font in android TextView using xml How Can I Convert Postscript Type 1 font to .otf or .ttf? How to host google web fonts on my own server? How do I set 'semi-bold' font via CSS? Font-weight of 600 doesn't make it look like the semi-bold I see in my Photoshop file Set a default font for whole iOS app? How to Set a Custom Font in the ActionBar Title? CSS Font "Helvetica Neue" How do I install a custom font on an HTML site

Questions with colors tag:

is it possible to add colors to python output? How do I use hexadecimal color strings in Flutter? How do I change the font color in an html table? How do I print colored output with Python 3? Change bar plot colour in geom_bar with ggplot2 in r How can I color a UIImage in Swift? How to change text color and console color in code::blocks? Android lollipop change navigation bar color How to change status bar color to match app in Lollipop? [Android] How to change color of the back arrow in the new material theme? ng-change not working on a text input Getting individual colors from a color map in matplotlib Change button background color using swift language Change navbar text color Bootstrap Why cannot change checkbox color whatever I do? How to change link color (Bootstrap) Transparent ARGB hex value Named colors in matplotlib Android : change button text and background color How can I get the iOS 7 default blue color programmatically? Change tab bar tint color on iOS 7 How to set custom ActionBar color / style? set background color: Android how to convert rgb color to int in java Change text color with Javascript? How to change heatmap.2 color range in R? How can I invert color using CSS? Changing background color of text box input not working when empty Change color of bootstrap navbar on hover link? Javascript change color of text and background to input value Should you use rgba(0, 0, 0, 0) or rgba(255, 255, 255, 0) for transparency in CSS? Hex transparency in colors Change Text Color of Selected Option in a Select Box How to generate a number of most distinctive colors in R? Plot multiple lines (data series) each with unique color in R WPF Label Foreground Color Can I change the color of Font Awesome's icon color? Invert colors of an image in CSS or JavaScript Programmatically set TextBlock Foreground Color Change UITextField and UITextView Cursor / Caret Color How to add color to Github's README.md file Set a thin border using .css() in javascript How to color the Git console? How to change the link color in a specific class for a div CSS Set color of text in a Textbox/Label to Red and make it bold in asp.net C# What are the default color values for the Holo theme on Android 4.0? navbar color in Twitter Bootstrap How to change node.js's console font color? How to change default text color using custom theme? How to compare two colors for similarity/difference