HTML and CSS Reference
In-Depth Information
if (!selected) {
alert(“You must choose a gender.”);
return false;
// Validation code
return true;
<style type=”text/css” media=”screen”>
form div {
margin-bottom: 1em;
div.submit input {
margin-left: 165px;
label.field {
display: block;
float: left;
margin-right: 15px;
width: 150px;
text-align: right;
input[type=”text”], select, textarea {
width: 300px;
font: 18px Verdana;
border: solid 2px #666;
background-color: #ada;
div.required label.field {
font-weight: bold;
div.required input, div.required select {
background-color: #6a6;
border: solid 2px #000;
font-weight: bold;
<h1> Registration Form </h1>
<p> Please fill out the form below to register for our site. Fields
with bold labels are required. </p>
Search WWH ::

Custom Search