I have 6 Errors and 2 warnings when i try to validate the “Contact Us” document with W3C Markup Validator.
But i am unsure what the validator is saying.
Can someone show me where i have went wrong, adding a form to the document has been pretty tricky.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Contact Us at Bubble Under</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link href="style1.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="header">
<div id="sitebranding">
<h1>BubbleUnder.com</h1>
</div>
<div id="tagline">
<p>Diving club for the south-west UK - let's make a splash!</p>
</div>
</div> <!-- end of header div -->
<div id="navigation">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About Us</a></li>#
<li><a href="events.html">Club Events</a></li>
<li><a href="contact.html">Contact Us</a></li>
<li><a href="gallery.html">Image Gallery</a></li>
</ul>
</div> <!-- end of navigation div -->
<div id="bodycontent">
<h2>Contact Us</h2>
<p>To let us know about a forthcoming dive event, please use the form below.</p>
<form action="" method="post" class="contact">
<fieldset>
<legend>Tell us About a Dive Event</legend>
<div>
<label for="contactname" class="fixedwidth">Contact Name</label>
<input type="text" name="contactname" id="contactname"/>
</div>
<div>
<label for="telephone" class="fixedwidth">Telephone Number</label>
<input type="text" name="telephone" id="telephone"/>
</div>
<div>
<label for="email" class="fixedwidth">Email Address</label>
<input type="text" name="email" id="email"/>
</div>
<div>
<label for="eventname" class="fixedwidth">What's the event called?</label>
<input type="text" name="eventname" id="eventname"/>
</div>
<div>
<label for="eventdate" class="fixedwidth">When's the event happening?</label>
<input type="text" name="eventdate" id="eventdate"/>
</div>
<div>
<label for="region" class="fixedwidth">What region is the event in?</label>
<select name="region" id="region">
<option>South-west</option>
<option>South-east</option>
<option>Midlands</option>
<option>Central</option>
<option>London</option>
<option>East</option>
<option>North</option>
<option>Scotland</option>
<option>Northern Ireland</option>
<option>Wales</option>
<option>International (see details below)</option>
</select>
</div>
<div>
<p>Please provide any other details you think will be useful to us
in the text area below (it may save us calling or emailing you,
and help avoid delays).</p>
<label for="details" class="fixedwidth">More details (as much as you think
we'll need!)</label>
<textarea name="details" id="details" cols="30" rows="7"></textarea>
</div>
<div>
<p>If we need to call you back for any more info, what would be the
best time to call you on the number supplied?</p>
<input type="radio" name="timetocall" id="morning" value="Morning"/>
<label for="morning">In the morning</label>
<br/>
<input type="radio" name="timetocall" id="afternoon" value="Afternoon"/>
<label for="afternoon">In the afternoon</label>
<br/>
<input type="radio" name="timetocall" id="evening" value="Evening"/>
<label for="evening">In the evening</label>
<br/>
<input type="radio" name="timetocall" id="never" value="Never" checked="checked"/>
<label for="never">No calls please</label>
</div>
<div>
<p>Bubble Under may share information you give us here with other
like-minded people or web sites to promote the event. Please confirm if you are happy for us to do this.</p>
<input type="checkbox" name="publicize" id="publicize" checked="checked"/>
<label for="publicize">I am happy for this event to be publicized outside of and beyond BubbleUnder.com, where possible</label>
</div>
<div class="buttonarea">
<input type="submit" value="Send Us the Info"/>
</div>
</fieldset>
</form>
<p>If you need to get in touch urgently, please call Bob Dobalina on 01793
641207. For anything else, please <a href="mailto:bob@bubbleunder.com">drop us a line by email</a>.</p>
</div> <!-- end of bodycontent div -->
</body>
</html>
These are the errors W3C says i have;
Validation Output: 6 Errors
Line 30, Column 76: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
<input type="hidden" name="acctid" id="acctid" value="trqoyaa5gwq282e5" />✉
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>").
Line 31, Column 66: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
<input type="hidden" name="formid" id="formid" value="829561" />✉
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>").
Line 32, Column 84: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
…put type="hidden" name="required_vars" id="required_vars" value="name,email" />✉
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>").
Line 33, Column 12: end tag for "form" omitted, but OMITTAG NO was specified
</div>✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
Line 29, Column 11: start tag was here
<form action="http://www.response-o-matic.com/mail.php" method="post"… Line 99, Column 17: end tag for element "form" which is not open
</form>✉
The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.
If this error occurred in a script section of your document, you should probably read this FAQ entry.
Line 101, Column 12: end tag for element "div" which is not open
</div> <!-- end of bodycontent div -->✉
The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.
If this error occurred in a script section of your document, you should probably read this FAQ entry.
Line 37, Column 31: reference to non-existent ID "contactname"
<label for="contactname" class="fixedwidth">Contact Name</lab…✉
This error can be triggered by:
•A non-existent input, select or textarea element
•A missing id attribute
•A typographical error in the id attribute
Try to check the spelling and case of the id you are referring to.