HTML and CSS Reference
In-Depth Information
<label for=”password”> Password </label>
<input type=”password” name=”password” />
<input type=”submit” class=”submit” value=”Log In” />
The Submit button is another type of input field. The value attribute is used as the label
for the Submit button. If you leave it out, the default label will be displayed by the
When you're naming form controls and labeling buttons, strive for
clarity and meaning. If a form is frustrating or hard to figure out,
visitors will leave your site for greener pastures!
Figure 11.1 contains a screenshot of the form with all the form elements in place.
The form with all
the input elements
in place.
At this point, you've created the form and it's ready to rumble. However, if you load it
into your web browser, you'll see that it doesn't look all that appealing. I can vastly
improve the appearance using Cascading Style Sheets (CSS) . Here's the code for the full
page, including the style sheet:
<!DOCTYPE html>
<title> Login Form </title>
<style type=”text/css”>
div {
Search WWH ::

Custom Search