| Audentes Fortuna Juvat
Join Date: Feb 2006 Location: Somewhere south of sanity
Posts: 1,460
| I am in the process of trying to code a form with radio buttons and drop down menus. However, when I go to validate it 1.0 strict, I am getting the same errors. They are appearing at the "income", "interests", "register", "comments", "buttons", and "strictvalid" entries which leads me to beleive that this is a cascading error somewhere at the top of the code. Quote:
Error Line 111 column 16: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag.
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned.
This might mean that you need a containing element, or possibly that you've forgotten to close a previous element. One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
| Anyone good with HTML and validating v1.0 strict able to help me out? The code follows in the next post. W3C Validator 1.0 Strict link. Code: <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="XHTML namespace" xml:lang="en" lang="en">
<!-- -->
<!-- -->
<!-- -->
<!-- -->
<head>
<title>Lab 7</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<p><strong>Fill out the following form to receive our newsletter</strong></p>
<p id="prename1"><input type="radio" value="Mr." name="prename1" />Mr.</p>
<p id="prename2"><input type="radio" value="Mrs." name="prename2" />Mrs.</p>
<p id="prename3"><input type="radio" value="Ms." name="prename3" />Ms.</p>
<p>Full Name: <input name="fullName" size="35" /></p>
<p>E-Mail: <input name="email" size="35" /></p>
<p>Phone Number (Optional)</p>
<div id="HP">Home Phone: <input name="hPhone" size="35" /></div>
<div id="BP">Business Phone: <input name="bPhone" size="35" /></div>
<div id="ST">State: <select name="state">
<option> </option>
<option>AK</option>
<option>AS</option>
<option>AZ</option>
<option>AR</option>
<option>CA</option>
<option>CO</option>
<option>CT</option>
<option>DE</option>
<option>DC</option>
<option>FM</option>
<option>FL</option>
<option>GA</option>
<option>GU</option>
<option>HI</option>
<option>ID</option>
<option>IL</option>
<option>IN</option>
<option>IA</option>
<option>KS</option>
<option>KY</option>
<option>LA</option>
<option>ME</option>
<option>MH</option>
<option>MD</option>
<option>MA</option>
<option>MI</option>
<option>MN</option>
<option>MS</option>
<option>MO</option>
<option>MT</option>
<option>NE</option>
<option>NV</option>
<option>NH</option>
<option>NJ</option>
<option>NM</option>
<option>NY</option>
<option>NC</option>
<option>ND</option>
<option>MP</option>
<option>OH</option>
<option>OK</option>
<option>OR</option>
<option>PW</option>
<option>PA</option>
<option>PR</option>
<option>RI</option>
<option>SC</option>
<option>SD</option>
<option>TN</option>
<option>TX</option>
<option>UT</option>
<option>VT</option>
<option>VI</option>
<option>VA</option>
<option>WA</option>
<option>WI</option>
<option>WV</option>
<option>WY</option>
<option>AA</option>
<option>AE</option>
<option>AP</option>
</div>
<p id="ZP"><input name="zip" size="35" /><br/>
<div id="income">
<input type="radio" value="$0 - $5,000" name="HI1" />$0 - $5,000<br/>
<input type="radio" value="$5,000 - $10,000" name="HI2" />$5,000 - $10,000<br/>
<input type="radio" value="$10,000 - $20,000" name="HI3" />$10,000 - $20,000<br/>
<input type="radio" value="$20,000 - $30,000" name="HI4" />$20,000 - $30,000<br/>
<input type="radio" value="Over $30,000" name="HI5" />Over $30,000<br/>
</div>
<div id="interests">
<input type="checkbox" name= "sports" /> Sports<br/>
<input type="checkbox" name= "travel" /> Travel<br/>
<input type="checkbox" name= "books" /> Books<br/>
<input type="checkbox" name= "theater" /> Theater<br/>
</div>
<div id="register">
<p id="id">User ID (6 characters max): <input name="userID" size="6" /></p>
<p id="pass1">Password (4 characters max): <input name="pass" size="4" /></p>
<p id="pass2">Re-enter Password: <input name="pass" size="4" /></p>
</div>
<p id="comments">
Please provide any additional comments:<br/>
<textarea rows="3" cols="30" name="comments" >Please enter text here</textarea>
</p>
<div id="buttons">
<input type="submit" value="Send Form" />
<input type="reset" value="Reset Form" />
</div>
<div id="strictvalid">
<p id="valid_icon_strict"><img src="valid_icon_strict.bmp" alt="W3C Strict Validated" width="88" height="31" /></p>
</div>
<div id="cssvalid">
<p id="valid_icon_css"><img src="valid_icon_css.bmp" alt="W3C CSS Validated" width="88" height="31" /></p>
</div>
</body>
</html>
|