Textbox Color

This page demonstrates textbox color and how to apply color to your HTML textboxes.

HTML textboxes are input fields created by the <textarea> element. You can use the CSS background-color and color properties to add color to your textboxes.

Textbox Background Color

To apply background color to your textbox, use the CSS background-color property. Example:

Source CodeResult

Text Color

To change the text color (i.e. the text inside the textbox), use the CSS color property. Example:

Source CodeResult

Textbox Border Color

To change the border color, use the CSS border property. You will also need to specify the width of the border and the style. Example:

Source CodeResult

About HTML Colors

The above examples use "hexadecimal values" to define the color. These are the number/letter combinations that begin with a # symbol. Hexadecimal (or just "hex") values aren't the only way of defining color in HTML. You can also use the RGB decimal equivalent or the color name.

For example, if you change the textbox background color to say, blue, you could specify any one of the following: background-color:blue;, background-color:#0000FF;, background-color:rgb(0,0,255);. Actually, you can also use hex shorthand, which would be background-color:#00F;.

For more information about applying color in HTML, see HTML color. Also check out these color scheme combinations to choose a color that's right for you.

About HTML.support

HTML.support was created in order to provide HTML tools, codes, tutorials, and other resources to help webmasters create and maintain their HTML documents.

HTML.support aims primarily at beginners, but may also be useful to web professionals.

About the HTML Codes

The HTML codes on this website are provided free of charge, for you to use however you wish. Feel free to modify the code to suit your own needs.

Need Hosting?

Our partner site HOSTEK provides website hosting, domain names and related products at some of the best prices on the web. If you need web hosting, check them out!