I cant seem to get this to validate in the W3C validator...Any suggestions <!DOC
ID: 3538423 • Letter: I
Question
I cant seem to get this to validate in the W3C validator...Any suggestions
<!DOCTYPE html>
<head>
<style>
input{
margin-left:20px;
width:250px;
height:36px;
position:absolute;left:200px;
}
select{
margin-left:20px;
width:250px;
height:36px;
position:absolute;left:200px;
}
textarea{
margin-left:20px;
width:250px;
height:56px;
position:absolute;left:200px;
}
form{
background-color:#0066B3;
padding:30px;
}
form.text{
margin-left:20px;
color:#FF3300;
}
.formItem{
font-size: 1.3em;
margin-top:30px;
}
</style>
</head>
<body>
<form action="" method="get">
<div class="formItem"><text>First Name</text><input type="text" name="fName" /><br/></div>
<div class="formItem"><text>Last Name</text><input type="text" name="lName" /><br/></div>
<div class="formItem"><text>Street Address</text><input type="text" name="street" /><br/></div>
<div class="formItem"><text>City</text><input type="text" name="city" /><br/></div>
<div class="formItem"><text>State</text><select name="state" ><option value="OH">OH</option><option value="KY">KY</option><option value="PA">PA</option><option value="TN">TN</option></select><br/></div>
<div class="formItem"><text>Zip</text><input type="text" name="zip" /><br/></div>
<div class="formItem"><text>Phone</text><input type="text" name="phone" /><br/></div>
<div class="formItem"><text>Email</text><input type="text" name="email" /><br/></div>
<div class="formItem"><text>Questions</text><textarea name="question" /></textarea><br/></div>
<div class="formItem"><input type="submit"/></div>
</form>
</body>
</html>
Explanation / Answer
<!DOCTYPE html>
<html lang="en">
<head>
<title>passed</title>
<meta charset="utf-8">
<style>
input{
margin-left:20px;
width:250px;
height:36px;
position:absolute;left:200px;
}
select{
margin-left:20px;
width:250px;
height:36px;
position:absolute;left:200px;
}
textarea{
margin-left:20px;
width:250px;
height:56px;
position:absolute;left:200px;
}
form{
background-color:#0066B3;
padding:30px;
}
form.text{
margin-left:20px;
color:#FF3300;
}
.formItem{
font-size: 1.3em;
margin-top:30px;
}
</style>
</head>
<body>
<form action="example.php" method="get">
<div class="formItem"><span>First Name</span><input type="text" name="fName"><br/></div>
<div class="formItem"><span>Last Name</span><input type="text" name="lName"><br/></div>
<div class="formItem"><span>Street Address</span><input type="text" name="street"><br/></div>
<div class="formItem"><span>City</span><input type="text" name="city"><br/></div>
<div class="formItem"><span>State</span><select name="state" ><option value="OH">OH</option><option value="KY">KY</option><option value="PA">PA</option><option value="TN">TN</option></select><br/></div>
<div class="formItem"><span>Zip</span><input type="text" name="zip" ><br/></div>
<div class="formItem"><span>Phone</span><input type="text" name="phone" ><br/></div>
<div class="formItem"><span>Email</span><input type="text" name="email" ><br/></div>
<div class="formItem"><span>Questions</span><textarea name="question" ></textarea><br/></div>
<div class="formItem"><input type="submit"></div>
</form>
</body>
</html>
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.