Helping ordinary people create extraordinary websites!
GET OUR NEWSLETTER
Your Email:
 

Things To Do With Textarea Form Fields

By Will Bontrager
2005-09-26


Bold Text and Text/Background Colors

Whether used for accepting user input or for providing text for copying, the textarea field can be formatted in several ways.

To make the text bold, add a "font-weight" definition to the style attribute. To change the text color, add a "color" definition. For background color, add a "background-color" definition.

This make a yellow background for bolded red text, 16 pixels in size:

<form>

<textarea
cols="22"
rows="5"
style="
font-size: 16px;
font-weight: bold;
color: red;
background-color: yellow;"
wrap="off">
</textarea>
</form>

Red text on a yellow background is not very attractive for some implementations. Try sky blue on silver. Any web color combinations are available to you.



Tutorial Pages:
» Things To Do With Textarea Form Fields
» Automatically Selecting Content
» Specifying Text Style, Wrap Characteristics, and Read Only
» Bold Text and Text/Background Colors
» Textarea Field With Background Image


Copyright 2004 Bontrager Connection, LLC


 | Bookmark
Related Tutorials:
» JavaScript Debugging Techniques with Firebug
» Striped Tables Using JavaScript
» Opening PDFs in a New Window with JavaScript
» Essential Javascript -- A Javascript Tutorial
» Submit Forms Conditionally using JavaScript
» How to Setup a Randomising Function

Advertise with Us!


Tutorials Scripts Web Hosting Developer Manuals
Resources