Skip Navigation to main content U.S. Department of Energy Energy Efficiency and Renewable Energy
Communication Standards and Guidelines
Communication Standards and Guidelines Home Page Print Guidelines Exhibit Guidelines Web Governance Web Project Management Guidelines Web Content Guidelines Web Technical Guidelines Coding Data Tables Forms HTML Syntax Native File Formats Coding Navigation and Other Links Scripts, Applets, and Dynamic Pages Search Testing Suite Title Tags Content Management System Electronic Newsletters Graphics Multimedia File Naming Conventions and Directory Structure PDFs QA Checklist Redirects and Proxies Templates Technical Maintenance Web Applications Style Guide Glossary Updates to Standards and Guidelines Training Contacts

Forms

This page describes the requirements for coding forms on the EERE Web site. Forms are used to gather information from a user.

All form controls should have text labels adjacent to them and should use the label and id html attributes to associate the text label with the input field.

Example:

<label for="SSN">Social Security Number:</label>
<input type=text name="SocSecNum" id="SSN">
or
<label>Date of birth: <input type=text name="DofB"></label>

For more information, see WebAim's article on creating accessible forms.