Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


An HTML 4.0 Example

Label Control Access
A
B
Sex: F
M
This example illustrates several notable features of HTML 4:

Table structure. Rows and columns may be grouped together to convey structural information about the table; these groups may be rendered by user agents in ways to emphasize this structure.

LABEL elements may be used to associate information with other control elements (except other LABEL elements). Labels may be rendered by user agents in various ways, e.g., visually, read by speech synthesizers, etc.) When a LABEL element receives focus (i.e. becomes the currently 'receptive' element), it passes the focus on to its associated control. A label is explicitly associated with another control using the for attribute of the LABEL and the id attribute of the control (i.e. they're the same). A control is implicitly associated with a LABEL by being enclosed between its start and end tags; note that if you do this you then cannot use table cells to lay out the two independently, since the start and end LABEL tags must be in the same cell. This example creates a table that is used to align some INPUT controls and their associated LABELs.

BUTTON elements whose type is "submit" are very similar to present 'submit' buttons (INPUT elements whose type is "submit"). They both cause form data to be submitted, but the BUTTON element allows HTML to be used on the button, e.g. for character formatting or to place an image. If a BUTTON is used with an IMG element, use the IMG element's alt attribute to provide a description for users who are unable to see the image.

Access Keys. "Pressing" an access key assigned to an element gives focus to the element. What 'pressing' means depends on the underlying system. In MS Windows one generally has to press the "Alt" key concurrently with the access key. On Apple systems, one typically has to press the "Cmd" key concurrently with the access key.

The rendering of access keys depends on the user agent. W3C recommends that authors include the access key in label text or wherever the access key is to apply.

What happens when an element receives focus depends on the element. Links defined by A are generally followed by the user agent when the 'Return' key is pressed; activated radio buttons change values, text fields allow user input, submit buttons become highlighted and act as if clicked on when the Return key is pressed, etc.



Up to => Home / Authoring / HTML / 4




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers