print page

Fieldset Tags

Designing A Better Website

By Jason J. Russo

Designing A Better Website

HTML Tips The Fieldset Tag
By: Jason J. Russo
This week I'm going to show you some HTML tags that you can use to add some great functionality to your forms.

<fieldset>  </fieldset>

The fieldset tag will add a windows like effect around any elements you put inside of it. This tag is great for grouping form elements together plus it just looks cool! Example:

Put A fieldset around this window

This will simply add a title to the fieldset tag. 

<legend>Windows Like Forms<legend>


Windowsput a fieldset tag around this window

<label> </label>
With the label key you can specify what part of a form element gets highlighted when you click on the assigned text within the label tag.

Here is an example: <label for="Bronze">Bronze</label> <input id="Bronze" name="itemstyle" type="radio" />

Click on the text "Bronze" below:

The above example will highlight the radio button. 'for' is the name you assign to the specific form function.
Access Key
<label accesskey="T" for="this"><u>T</u>ext Field:</label> <input id="this" type="text" />

By adding the accesskey within your label tag you can assign a letter on the users keyboard so that when they press the ALT "letter you assign" together it will highlight that object.

Window like forms Click on the text below and the radio buttons will check.



If you have any comments or questions about today's tips please ©2000 Jason Russo, H.B. Distribution.

All rights reserved.

Jason Russo specializes in website design, and programming for the web. 

This article may be reproduced in its entirety providing this resource box is included.