Geek's Portal For Computers Graphics Operating Systems Multi-Media Networking Programming Data Format and  News
[ Start Page ] [ Contacting ] [ About ] [ Link To Us ] [ Geek Gear ] Wed, Jul 23 2008 
Free Internet Tools by web-geek.com Internet Tools
Administrator Tools
Name Server Look Up
Ping Test
Who Is
Trace Route

Web Developer Tools
Web Safe Colors
HTML Character Map
PopUp Generator
Body Color CSS v1.0
Browser Information
Meta Tag Generator
Keywords Generator
Link Popularity
JavaScript Escape / Unescape Converter
JavaScript Drop Down Menu Builder
Web / Virtual Hosting Directory

Reference Documention
HTML 4.0 Reference

Reference Tables
Character Conversion Table
Domain Name Suffixes

Cheat Sheets
Vi / Vim Basic Commands


WEB-GEEK.COM's Feature Sites Feature Sites
oGobogo Internet Search Directory
News.web-geek.com Internet News Directory
Pdawebgeek.com PDA Friendly Web Directory
Games.web-geek.com Free Online Games


folder HTML 4.0

LEGEND - Fieldset Caption

Syntax <LEGEND>...</LEGEND>
Attribute Specifications
Contents Inline elements
Contained in FIELDSET

The LEGEND element defines a caption for form controls grouped by the FIELDSET element. The LEGEND element must be at the start of a FIELDSET, before any other elements.

While the LEGEND element is not widely supported by current browsers, it can still be used safely if a block-level element immediately follows the LEGEND. Combined with careful use of FIELDSET, this will cause non-supporting browsers to render the caption as its own paragraph. Elements such as STRONG, B, and BIG could also be used to help express the meaning of LEGEND to non-supporting browsers.

An example follows:

<FIELDSET>
  <LEGEND ACCESSKEY=C>Credit Card Information</LEGEND>
  <P>
    <LABEL ACCESSKEY=V>
      <INPUT TYPE=radio NAME=card VALUE=visa> Visa
    </LABEL>
    <LABEL ACCESSKEY=M>
      <INPUT TYPE=radio NAME=card VALUE=mc> MasterCard
    </LABEL>
    <BR>
    <LABEL ACCESSKEY=N>
      Number: <INPUT TYPE=text NAME=number>
    </LABEL>
    <BR>
    <LABEL ACCESSKEY=E>
      Expiry: <INPUT TYPE=text NAME=expiry>
    </LABEL>
  </P>
</FIELDSET>

LEGEND's ACCESSKEY attribute, used throughout the preceding example, specifies a single Unicode character as a shortcut key for giving focus to the LEGEND, allowing the user to quickly jump to a group of form controls. Entities (e.g. &eacute;) may be used as the ACCESSKEY value.

The deprecated ALIGN attribute of LEGEND suggests where the caption should be positioned relative to the FIELDSET on visual browsers. Possible values are top, bottom, left, and right. While ALIGN is deprecated, no alternative currently exists in Cascading Style Sheets.

More Information

Copyright © 1998 by Liam Quinn. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/).


Sponsor Sponsor


  © 1999-2006, web-geek.com a Geek Boy Enterprises, Inc. website terms and conditions of use [ Start Page ] [ Contacting ] [ About ] [ Link To US ]