Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

I need help validating XHTML for my website project


  • Please log in to reply

#1
ToniM

ToniM

    New Member

  • Member
  • Pip
  • 4 posts
Hello,

I am doing a website project for Uni, and I've managed to Validate all of my XHTML on my web pages except for 1 page.... Can anyone out there please help me and tell me what I've done wrong and/or how to fix it?

Thanks in advance.

HERE IS MY XHTML: (the errors are listed below the code)


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR...l1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>DEMA AUSTRALIA - Contact Us</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><img src="images/Logo.jpg" class="logopic" width="608" height="96" alt="Dema Logo"/></h1>
</div>
<div id="tagline">
<p>High Quality Dispensing and Control Products</p>
</div> <!-- end of header div -->
<div id="navigation">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="products.html">Products</a></li>
<li><a href="catalogues.html">Catalogues</a></li>
<li><a href="aboutus.html">About Us</a></li>
<li><a href="training.html">Training</a></li>
</ul>
</div> <!-- end of navigation div -->
<div id="bodycontent">
<h2>Contact Us</h2>
<p class="address"><strong>Dema Australia</strong><br />
Unit 8, 7-11 Parraweena Rd<br />
Caringbah N.S.W 2229<br />
<br />
Phone: (02) 9525 5177<br />
Fax: (02) 9525 5033</p>
<br />
<table class="contacts" summary="Contacts at Dema Australia">
<caption>Contacts at Dema Australia</caption>
<tr>
<td>Sales and Marketing Manager</td>
<td>Graham Austin</td>
<td><a href="mailto:graham@demaust.com">graham@demaust.com</a></td>
</tr>
<tr>
<td>Operations and Technical Manager</td>
<td>Geoff Moroney</td>
<td><a href="mailto:geoffm@demaust.com">geoffm@demaust.com</a></td>
</tr>
<tr>
<td>Accountant</td>
<td>Kalee Scicluna</td>
<td><a href="mailto:kalee@demaust.com">kalee@demaust.com</a></td>
</tr>
<tr>
<td>Accounts Receivable</td>
<td>Toni Mason</td>
<td><a href="mailto:toni@demaust.com">toni@demaust.com</a></td>
</tr>
<tr>
<td>Warehouse Manager/Despatch</td>
<td>Ryan Grimshaw</td>
<td><a href="mailto:ryan@demaust.com">ryan@demaust.com</a></td>
</tr>
<tr>
<td>Production Manager</td>
<td>Nathan Magrin</td>
<td><a href="mailto:nathan@demaust.com">nathan@demaust.com</a></td>
</tr>
</table>
<br />
<p>If you have any queries please feel free to contact us at the above email address's or use the form below</p>
<form action="http://www.freedback...k.com/mail.php" method="post" class="contact">
<p><input type="hidden" name="acctid" id="acctid" value="krw7nz29lh21bzu9" />
<input type="hidden" name="formid" id="formid" value="593824" /></p>
<fieldset>
<legend>Fill Out And Click Submit</legend>
<div>
<label for="contactname" class="fixedwidth">Contact Name</label>
<input type="text" name="contactname" id="contactname" />
</div>
<div>
<label for="company" class="fixedwidth">Company Name</label>
<input type="text" name="company" id="company" />
</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="model" class="fixedwidth">Dispenser Model</label>
<select name="model" id="model">
<option>none/other</option>
<option>P804L Laundry Dispenser</option>
<option>T.812.ll Titan Dispenser</option>
<option>Siesta Pool Chlorinator</option>
<option>633 Blend Centre</option>
<option>925 Air Foamer</option>
<option>Mixrite</option>
<option>Olympian Dispenser</option>
</select>
</div>
<div>
<p>If you have an enquiry about products, training, accounts or anythings else, please use the form below to send us your enquiry.</p>
<label for="details" class="fixedwidth">Enquiry - Please provide as much detail as possible:</label>
<textarea id="details" name="details" cols="40"
rows="7"></textarea>
</div>
<div>
<p>If you would like a Dema Representative to give you a call, please provide the best time to call you:</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="never" value="Never" checked="checked"/>
<label for="never">No Calls Please</label>
</div>
<div>
<p>Dema Australia now distributes their newsletters, and special product information via electronic delivery (email), Please confirm
if you wish to be added to our email mailing list.</p>
<input type="checkbox" name="mailing" id="mailing" checked="checked"/>
<label for="mailing">I would like to receive Dema's newletter via email.</label>
</div>
<br />
<div class="buttonarea">
<input type="submit" value="Submit Enquiry"/>
</div>
</fieldset>

</div> <!--end of body content div -->
</body>
</html>


ERRORS - I used the validator at http://validator.w3....idate_by_upload

Validation Output: 7 Errors
Line 131, Column 6: end tag for "form" omitted, but OMITTAG NO was specified
</div> <!--end of body content 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 69: start tag was here
><form action="http://www.freedback...k.com/mail.php" method="post" class="contact"> Line 132, Column 9: end tag for "div" omitted, but OMITTAG NO was specified
</body>✉
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 9, Column 2: start tag was here
<div id="header"> Line 131, Column 6: XML Parsing Error: Opening and ending tag mismatch: form line 69 and div
</div> <!--end of body content div -->✉
Line 132, Column 9: XML Parsing Error: Opening and ending tag mismatch: div line 25 and body
</body>✉
Line 133, Column 7: XML Parsing Error: Opening and ending tag mismatch: div line 9 and html
</html>✉
Line 133, Column 7: XML Parsing Error: Premature end of data in tag body line 8
</html>✉
Line 133, Column 7: XML Parsing Error: Premature end of data in tag html line 2
</html>✉
  • 0

Advertisements


#2
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
A lot of your closings for tags do not close with a space an then the "/" Redo those. It would be better if you gave a link to the page online as the line numbers mean nothing here and it makes it harder to check. I know I can check your code by direct input, but I would like to use my web tools.

<!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>DEMA AUSTRALIA - Contact Us</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><img src="images/Logo.jpg" class="logopic" width="608" height="96" alt="Dema Logo" /></h1></div>

<div id="tagline"><p>High Quality Dispensing and Control Products</p></div>
</div> <!-- end of header div -->

<div id="navigation">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="products.html">Products</a></li>
<li><a href="catalogues.html">Catalogues</a></li>
<li><a href="aboutus.html">About Us</a></li>
<li><a href="training.html">Training</a></li>
</ul>
</div> <!-- end of navigation div -->

<div id="bodycontent">
<h2>Contact Us</h2>

<p class="address"><strong>Dema Australia</strong><br />Unit 8, 7-11 Parraweena Rd<br />Caringbah N.S.W 2229<br /><br />
Phone: (02) 9525 5177<br />Fax: (02) 9525 5033</p>

<br />

<table class="contacts" summary="Contacts at Dema Australia">
<caption>Contacts at Dema Australia</caption>
<tr>
<td>Sales and Marketing Manager</td>
<td>Graham Austin</td>
<td><a href="mailto:graham@demaust.com">graham@demaust.com</a></td>
</tr>

<tr>
<td>Operations and Technical Manager</td>
<td>Geoff Moroney</td>
<td><a href="mailto:geoffm@demaust.com">geoffm@demaust.com</a></td>
</tr>

<tr>
<td>Accountant</td>
<td>Kalee Scicluna</td>
<td><a href="mailto:kalee@demaust.com">kalee@demaust.com</a></td>
</tr>

<tr>
<td>Accounts Receivable</td>
<td>Toni Mason</td>
<td><a href="mailto:toni@demaust.com">toni@demaust.com</a></td>
</tr>

<tr>
<td>Warehouse Manager/Despatch</td>
<td>Ryan Grimshaw</td>
<td><a href="mailto:ryan@demaust.com">ryan@demaust.com</a></td>
</tr>

<tr>
<td>Production Manager</td>
<td>Nathan Magrin</td>
<td><a href="mailto:nathan@demaust.com">nathan@demaust.com</a></td>
</tr>
</table>

<br />

<p>If you have any queries please feel free to contact us at the above email address's or use the form below</p>

<form action="http://www.freedback.com/mail.php" method="post" class="contact">
<p><input type="hidden" name="acctid" id="acctid" value="krw7nz29lh21bzu9" /><input type="hidden" name="formid" id="formid" value="593824" /></p>

<fieldset>
<legend>Fill Out And Click Submit</legend>

<div>
<label for="contactname" class="fixedwidth">Contact Name</label>
<input type="text" name="contactname" id="contactname" />
</div>

<div>
<label for="company" class="fixedwidth">Company Name</label>
<input type="text" name="company" id="company" />
</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="model" class="fixedwidth">Dispenser Model</label>

<select name="model" id="model">
<option>none/other</option>
<option>P804L Laundry Dispenser</option>
<option>T.812.ll Titan Dispenser</option>
<option>Siesta Pool Chlorinator</option>
<option>633 Blend Centre</option>
<option>925 Air Foamer</option>
<option>Mixrite</option>
<option>Olympian Dispenser</option>
</select>
</div>
<div>

<p>If you have an enquiry about products, training, accounts or anythings else, please use the form below to send us your enquiry.</p>

<label for="details" class="fixedwidth">Enquiry - Please provide as much detail as possible:</label>

<textarea id="details" name="details" cols="40" rows="7"></textarea>
</div>

<div>
<p>If you would like a Dema Representative to give you a call, please provide the best time to call you:</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="never" value="Never" checked="checked" />
<label for="never">No Calls Please</label>
</div>

<div>
<p>Dema Australia now distributes their newsletters, and special product information via electronic delivery (email), Please confirm if you wish to be added to our email mailing list.</p>

<input type="checkbox" name="mailing" id="mailing" checked="checked" />
<label for="mailing">I would like to receive Dema's newletter via email.</label>
</div>

<br />

<div class="buttonarea">
<input type="submit" value="Submit Enquiry" />
</div>
</fieldset>
</form>

</div> <!--end of body content div -->
</body></html>

Corrected.

Edited by Major Payne, 27 May 2009 - 07:51 PM.

  • 0

#3
ToniM

ToniM

    New Member

  • Topic Starter
  • Member
  • Pip
  • 4 posts
Thank you very much for your help I really appreciate it, but there is still a problem, and now I'm thinking it's to do with my CSS sheet-

This is the link to the page that is NOT xhtml valid

http://www.dakotabre.../contactus.html

I changed everything to the way you change it, however the closing div you added here:

<div id="tagline"><p>High Quality Dispensing and Control Products</p></div>

If I put the closing closing div in, the page passes the vaidation, but it messes up the page layout as you'll see at the above link. If I take out that closing div, the page sits correctly but fails the vaildation test! - Frustrating!!!

I am really sorry to ask, but is it now my css sheet that is the problem with the </div> on the page? I don't understand this is the same as all the other pages so I don't understand why this one is different. None of the other pages needed that closing div after the tagline to pass validation.

MY CSS:

/*
CSS for Dema Australia
*/

body {
font-family: Verdana, Helvetica, Arial, Sans-serif;
background-color: #7da5b8;
line-height: 125%;
padding: 0;
margin: 0;
}

p {
font-size: small;
color: #000066;
}

h1 {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
color: white;
background-color: white;
padding-top: 5px;
padding-bottom: .2em;
padding-left: .4em;
margin: 0;
}

h2 {
color: #cc0033;
font-size: medium;
padding-top: 15px;
font-weight: bold;
}

li {
font-size: small;
}

em {
font-size: small;
text-transform: uppercase;
}

#tagline p {
font-style: italic;
color: black;
font-family: Georgia, Times, serif;
background-color: #bed8f3;
border-top: 3px solid #cc0033;
padding-left: .8em;
border-bottom: 3px solid #cc0033;
}

a {
font-weight: bold;
color: black;
}

a:hover {
text-decoration: none;
color: #cc0033;
}

.address {
color: #000066;
font-family: Verdana, Helvetica, Arial, Sans-serif;
font-size: medium;
}

#navigation {
width: 180px;
background-color: #999996;
}

#header {
border-top: 3px solid #cc0033;
}

.pixelpadding {
padding: 30px;
border: 1px dashed gray;
}

h2, ul {
margin-top: 15px;
}

#navigation, #bodycontent, #header {
position: absolute;
}

#bodycontent {
left: 200px;
}

#header, #tagline {
width: 100%
}
.validator {
border: none;
}

.logopic {
border: none;
}
.indexpic {
float: right;
margin: 10px;
}

.aboutuspic {
float: right;
margin: 10px;
}
.catpic {
margin: 60px;
}
img {
border: 2px solid black;
}
.catadwld {
font-weight: normal;
color: white;
}
table.Training th, table.Training td {
padding: 4px;
border: 1px solid #000066;
}
table.Training th {
font-size: small;
text-align: left;
color: #000066;
padding-top: 0;
padding-bottom: 0;
padding-left: 2px;
padding-right: 2px;
}
table.Training td {
font-size: small;
padding-right: 15px;
}
table.Training caption {
color: #000066;
font-size: small;
text-align: left;
padding-bottom: 5px;
font-weight: bold;
}
table.Training {
border-collapse: collapse;
}
table.contacts td {
font-size: small;
padding-right: 25px;
padding-bottom: 15px;
}
table.contacts caption {
color: #000066;
font-size: small;
text-align: left;
padding-bottom: 5px;
font-weight: bold;
}
table.contact {
border-collapse: collapse;
}
form.contact fieldset {
border: 2px solid navy;
padding: 10px;
}
form.contact legend {
font-weight: bold;
font-size: small;
color: #cc0033;
padding: 5px;
}
form.contact label {
font-weight:bold;
font-size: small;
color: #000066;
}
form.contact label.fixedwidth {
display: block;
width: 240px;
float: left;
}
form.contact .buttonarea input {
background: gray;
color: white;
font-weight: bold;
padding: 5px;
border: 1px #000066;
}
  • 0

#4
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
I just put the closing div there as I did not have a way to know or see what layout you had for your page. The closing div can be added later down the page if it is NOT suppose to be closed at that point. The opening div, "<div id="tagline">" defines the CSS for the content between it and the closing div. Move the closing div to the point where the CSS, as defined by "id="tagline", ends.

The CSS as given for the link you gave is valid.

Edited by Major Payne, 27 May 2009 - 10:48 PM.

  • 0

#5
ToniM

ToniM

    New Member

  • Topic Starter
  • Member
  • Pip
  • 4 posts
Ah, Got it now... Thank You so much Major Payne :) I really appreciate your help!!

THANK YOU
  • 0

#6
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
You are very welcome. Glad to have helped.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP