# HTML Form Color Question

**URL:** <https://boards.straightdope.com/t/html-form-color-question/135610>\
**Category:** Factual Questions\
**Created:** [November 6, 2002, 9:28pm UTC](https://boards.straightdope.com/t/html-form-color-question/135610 "2002-11-06T21:28:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duderdude2](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@Duderdude2](https://boards.straightdope.com/u/Duderdude2)\
**Post date:** [November 6, 2002, 9:28pm UTC](https://boards.straightdope.com/t/html-form-color-question/135610/1 "2002-11-06T21:28:13Z")

</div>

How can I change the color of the background used in a form? Thanks.

---

<div class="post-metadata">

**Author:** ![xash](https://avatars.discourse-cdn.com/v4/letter/x/c6cbf5/32.png) [@xash](https://boards.straightdope.com/u/xash)\
**Post date:** [November 6, 2002, 9:46pm UTC](https://boards.straightdope.com/t/html-form-color-question/135610/2 "2002-11-06T21:46:26Z")

</div>

\<BODY BGCOLOR="#???"\>

The 6 question marks represent the numbers that make up the hexadecimal code for a particular colour. For a list of popular colours and their hexadecimal codes see the Colour Codes:

[http://rd.alphalink.com.au/htmlguide/colours.html](http://rd.alphalink.com.au/htmlguide/colours.html)

or use this:

[http://www.imagitek.com/bcs.html](http://www.imagitek.com/bcs.html)

---

<div class="post-metadata">

**Author:** ![Duderdude2](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@Duderdude2](https://boards.straightdope.com/u/Duderdude2)\
**Post date:** [November 6, 2002, 9:50pm UTC](https://boards.straightdope.com/t/html-form-color-question/135610/3 "2002-11-06T21:50:34Z")

</div>

Thanls, but I know how to change the background color of a page…What I need to know is how to change the BG color of a “Form” (ones where you fill it out then click the submit button).

---

<div class="post-metadata">

**Author:** ![Crusoe](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Crusoe](https://boards.straightdope.com/u/Crusoe)\
**Post date:** [November 6, 2002, 10:03pm UTC](https://boards.straightdope.com/t/html-form-color-question/135610/4 "2002-11-06T22:03:23Z")

</div>

Be aware that changing form background colours is not supported by all browsers.

The code is:

```auto

<textarea bgcolor="#cccccc">

```

---

<div class="post-metadata">

**Author:** ![GuanoLad](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/guanolad/32/42_2.png) [@GuanoLad](https://boards.straightdope.com/u/GuanoLad)\
**Post date:** [November 6, 2002, 10:05pm UTC](https://boards.straightdope.com/t/html-form-color-question/135610/5 "2002-11-06T22:05:16Z")

</div>

You have to do it in CSS.

\<input type=“text” style=“background-color: #99CCCC” value=“Submit”\>

You can also change borders and text fonts.

---

<div class="post-metadata">

**Author:** ![GuanoLad](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/guanolad/32/42_2.png) [@GuanoLad](https://boards.straightdope.com/u/GuanoLad)\
**Post date:** [November 6, 2002, 10:06pm UTC](https://boards.straightdope.com/t/html-form-color-question/135610/6 "2002-11-06T22:06:59Z")

</div>

[http://webdesign.about.com/library/weekly/aa052801a.htm](http://webdesign.about.com/library/weekly/aa052801a.htm)

I made a typo above, but anyhoo, here’s a URL for some help.

---

<div class="post-metadata">

**Author:** ![Crusoe](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Crusoe](https://boards.straightdope.com/u/Crusoe)\
**Post date:** [November 6, 2002, 10:11pm UTC](https://boards.straightdope.com/t/html-form-color-question/135610/7 "2002-11-06T22:11:59Z")

</div>

…yep, **GuanoLad** ’s way would be my choice too. Much simpler. Still doesn’t work on all browsers, though.

---

<div class="post-metadata">

**Author:** ![Duderdude2](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@Duderdude2](https://boards.straightdope.com/u/Duderdude2)\
**Post date:** [November 6, 2002, 10:38pm UTC](https://boards.straightdope.com/t/html-form-color-question/135610/8 "2002-11-06T22:38:13Z")

</div>

Awesome, it worked! Now how do i adjust the text color in the forum? (I need white text against the black background)

---

<div class="post-metadata">

**Author:** ![Crusoe](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Crusoe](https://boards.straightdope.com/u/Crusoe)\
**Post date:** [November 6, 2002, 10:51pm UTC](https://boards.straightdope.com/t/html-form-color-question/135610/9 "2002-11-06T22:51:44Z")

</div>

```auto

<input type="text" style="background-color: #99CCCC; color:#FFFFFF;" value="Submit">

```

Yes, you can change the border colour and style too.

---

<div class="post-metadata">

**Author:** ![xash](https://avatars.discourse-cdn.com/v4/letter/x/c6cbf5/32.png) [@xash](https://boards.straightdope.com/u/xash)\
**Post date:** [November 7, 2002, 12:32am UTC](https://boards.straightdope.com/t/html-form-color-question/135610/10 "2002-11-07T00:32:49Z")

</div>

> [@](#):
>
> \*Originally posted by Duderdude2 \*  
> \*\*Thanls, but I know how to change the background color of a page…What I need to know is how to change the BG color of a “Form” (ones where you fill it out then click the submit button). \*\*

Oh, sorry. I misunderstood your question to mean the background of the page on which the form exists. Apologies. Carry on.
