[RESOLVED] Help with W3 validator errors
Hi
I run my site from the W3 check and have fixed all the errors except for 2, Which I just cant seem to fix.
Code:
Line 108, Column 5: end tag for "form" omitted, but OMITTAG NO was specified
</td>
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 80, Column 1: start tag was here
<form id="date" name="date" method="get" action="javascript :action">
Line 215, Column 7: 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.
Here is my code
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 6 November 2007), see www.w3.org" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>
<title>Price Calculator- Penny Car Hire</title>
<meta name="keywords" content="self drive van hire, uk, car hire, surrey, berkshire, staines, windsor, addlestone, egham, self drive, cars, vans, mpv, people carrier, rental, hire, monthly deals, reservations, local, pick-up, drop-off, points" />
<meta name="description" content="Surrey and Berkshire based company offering self drive van hire and cheap car hire, from hatchbacks to Transit vans." />
<link rel="stylesheet" href="layout-ff.css" type="text/css" media="screen, projection" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen, projection" />
<script type="text/javascript" src="price2.js" charset="utf-8">
</script>
<script type="text/javascript">
//<![CDATA[
<!--
function newcust(){
if(document.date.hireb4.options[document.date.hireb4.selectedIndex].value=="")
{alert("Please Select New Or Returning Customer");}
return false;
}
//-->
//]]>
</script>
<style type="text/css">
/*<![CDATA[*/
div.c7 {height:180px;}
table.c6 {background-color: #CCCCCC; margin: 2px auto}
div.c5 {margin-left: 2em; text-align: center}
input.c4 {text-align:center;font-weight:bold;color:#000000}
img.c3 {cursor:pointer}
span.c2 {font-size: 80%}
input.c1 {display: none;}
/*]]>*/
</style>
</head>
<body onload="loading()">
<div id="container"><!-- header ................................. -->
<div id="header">
<h1><a href="/index.html"><img src="images/pchsmall.gif" alt="** PLEASE DESCRIBE THIS IMAGE **" /><img src="images/pennylogo.jpg" alt="** PLEASE DESCRIBE THIS IMAGE **" /></a></h1>
</div>
<!-- /header -->
<!-- navigation ................................. -->
<div id="navigation">
<ul>
<li><a href="index.html">ALL VEHICLES</a></li>
<li><a href="Cars.html">Car Rental's</a></li>
<li><a href="MPV.html">People Carrier's < 4X4</a></li>
<li><a href="Vans.html">Van Rental's</a></li>
<li><a href="deals.html">Monthly Deals</a></li>
<li><a href="price.html">Price Calculator</a></li>
</ul>
</div>
<!-- /navigation -->
<br />
<!-- content ................................. -->
<div class="entry single" id="pcontent">
<table class='c6' border="5" width="600" cellspacing="4">
<tr>
<td>
<table align="center" border="0" width="470" cellspacing="0" cellpadding="2">
<tr>
<td align="center" height="25" colspan="4" width="470"><span><strong>Please Enter Details For A Quote.</strong></span></td>
</tr>
<tr>
<td align="right">Select Car:</td>
<td colspan="3" height="25" width="220">
<form id="date" name="date" method="get" action="javascript :action">
<input type="text" id='lpag' class="c1" /><input class="c1" id="date1" name="date1" /><input class="c1" id="date2" name="date2" />
<select name="car" id="car" onchange="dateDiff() ;calculate() ;incmile() ;deposit() ;milecharge() ;agecheck()">
<option value="A">Manual Panda 1.2 5DR</option>
<option value="A2">Auto Smart 1.0 Passion 3DR</option>
<option value="B">Manual Clio 3 1.2 Extreme 3DR</option>
<option value="B2">Manual Picanto 1.0 5DR</option>
<option value="CD">Manual Rio 1.5 CRDI 5DR</option>
<option value="CD2">Manual Clio 3 1.2T I-Music 5DR</option>
<option value="CD3">Auto Picanto 1.25 5DR</option>
<option value="E">Manual Venga 1.4 5DR</option>
<option value="E2">Auto Rio 1.4 5DR</option>
<option value="F">Auto Focus 1.6 5DR</option>
</select> <button type="button" onclick="info()">More Info</button>
</td>
</tr>
<!--=======end drop down box====-->
<tr>
<td height="25" align="right"><span class="c2">Collect Date:</span></td>
<td height="24" width="220"><input id='firstDate' type="text" readonly="readonly" size="25" onchange="dateDiff() ;calculate() ;suncheck() ;satcheck() ;deposit() ;incmile() ;milecharge() ;box2()" /><img src="images/cal.gif" onclick="javascript :NewCssCal ('firstDate','ddMMyyyy','','','','','future')" class="c3" alt="** PLEASE DESCRIBE THIS IMAGE **" /></td>
<!--======new time box====================-->
<td height="25" align="right"><span class="c2">Time:</span></td>
<td align="right" width="97"><span class="c2"><select name="time1" id="time1" onchange="dateDiff() ;calculate() ;suncheck() ;incmile() ;satcheck() ;deposit() ;milecharge()">
<option value="1">08:00 AM</option>
<option value="2">08:30 AM</option>
<option value="3">09:00 AM</option>
<option value="4">09:30 AM</option>
<option value="5">10:00 AM</option>
<option value="6">10:30 AM</option>
<option value="7">11:00 AM</option>
<option value="8">11:30 AM</option>
<option value="9" selected="selected">12:00 PM</option>
</select></span></td>
<!--========end time box================================--></tr>
<tr>
<td height="21" align="right"><span class="c2">Return Date:</span></td>
<td height="23" width="220"><input id='secondDate' type="text" size="25" readonly="readonly" onchange="dateDiff() ;calculate() ;satcheck2() ;deposit() ;suncheck2() ;milecharge() ;incmile() ;box2()" /><img src="images/cal.gif" onclick="javascript :NewCssCal ('secondDate','ddMMyyyy','','','','','future')" class="c3" alt="** PLEASE DESCRIBE THIS IMAGE **" /></td>
<!--======new time box====================-->
<td height="25" align="right"><span class="c2">Time:</span></td>
<td align="right" width="97"><span class="c2"><select name="time2" id="time2" onchange="dateDiff() ;calculate() ;dateDiff() ;suncheck2() ;incmile() ;satcheck2() ;deposit() ;milecharge()">
<option value="1">08:00 AM</option>
<option value="2">08:30 AM</option>
<option value="3">09:00 AM</option>
<option value="4">09:30 AM</option>
<option value="5">10:00 AM</option>
<option value="6">10:30 AM</option>
<option value="7">11:00 AM</option>
<option value="8">11:30 AM</option>
<option value="9" selected="selected">12:00 PM</option>
</select></span></td>
<!--========end time box================================--></tr>
<tr>
<td align="right" height="15"><span class="c2">Rental Period:</span></td>
<td colspan="3" height="25" width="220"><input type="text" onchange="satcheck()" class="c4" name="days" readonly="readonly" /></td>
</tr>
<tr>
<td height="25" align="right"><span class="c2">Price:</span></td>
<td colspan="0" height="25" width="220"><input type="text" class="c4" name="rentalamount" readonly="readonly" /></td>
</tr>
<tr>
<td height="25" align="right"><span class="c2">Deposit:</span></td>
<td colspan="3" height="25" width="220"><input type="text" class="c4" id="depo" name="depo" readonly="readonly" /></td>
</tr>
<tr>
<td height="25" align="right"><span class="c2">Mileage Allowance:</span></td>
<td colspan="3" height="25" width="220"><input type="text" class="c4" id="alow" name="alow" readonly="readonly" /></td>
</tr>
<tr>
<td height="25" align="right"><span class="c2">Excess Mileage:</span></td>
<td colspan="3" height="25" width="220"><input type="text" class="c4" name="mile" readonly="readonly" /></td>
</tr>
<tr>
<td colspan="6" height="25" width="220">
<div class="c5"><br />
<strong>Opening times</strong><br />
Monday - Friday: 8AM - 8PM<br />
Saturday: 9AM - 6 PM<br />
Sunday: 4PM - 8PM<br />
<br />
Please Note The Prices Are For UK Only <br />
If You Wish To Go Oversea's Please Call Us<br />
<br />
Call us on: 01344 843050<br />
Please Check our <a href='conditions.html' title=''>Terms and Conditions</a><br />
Have You hired from us in the last 3 years: <select name="hireb4" id="hireb4" onchange="this.form.action=this.options[this.selectedIndex].value;">
<option value="">Please Select:</option>
<option value="bookingprev.html">Yes</option>
<option value="booking.html">No</option>
</select><br />
<button type="submit" onclick="newcust()" value="Submit">Booking Request</button></div>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- /content -->
<!-- subcontent ................................. -->
<!-- footer ................................. -->
<div id="footer">
<p><strong>© 2006 - 2009 Penny Car Hire: <a href="http://www.pennycarhire.co.uk">Self Drive Van Hire and Car Hire, Surrey and Berkshire</a>. All Rights Reserved.</strong></p>
<!-- /footer --></div>
<div class="c7"></div>
<!-- Google Code for Price Quote Conversion Page --></div>
</body>
</html>
My very strong guess is you try to have the form go across multiple <td> tags.
Code:
<td colspan="3" height="25" width="220">
<form id="date" name="date" method="get" action="javascript :action">
<input type="text" id='lpag' class="c1" />
<input class="c1" id="date1" name="date1" />
<input class="c1" id="date2" name="date2" />
<select name="car" id="car" onchange="dateDiff() ;calculate() ;incmile() ;deposit() ;milecharge() ;agecheck()">
<option value="A">Manual Panda 1.2 5DR</option>
<option value="A2">Auto Smart 1.0 Passion 3DR</option>
<option value="B">Manual Clio 3 1.2 Extreme 3DR</option>
<option value="B2">Manual Picanto 1.0 5DR</option>
<option value="CD">Manual Rio 1.5 CRDI 5DR</option>
<option value="CD2">Manual Clio 3 1.2T I-Music 5DR</option>
<option value="CD3">Auto Picanto 1.25 5DR</option>
<option value="E">Manual Venga 1.4 5DR</option>
<option value="E2">Auto Rio 1.4 5DR</option>
<option value="F">Auto Focus 1.6 5DR</option>
</select>
<button type="button" onclick="info()">More Info</button>
<!-- missing /form -->
</td>
The <td> tag is closed with no </form>. That tag is added later where there is no opening <form> tag to go along with it.
Originally Posted by
spufi
My very strong guess is you try to have the form go across multiple <td> tags.
The <td> tag is closed with no </form>. That tag is added later where there is no opening <form> tag to go along with it.
So what your saying is that a <form> cannot go past </td> ? any ideas how to fix it ?
Originally Posted by
chrisboots
So what your saying is that a <form> cannot go past </td> ? any ideas how to fix it ?
It honestly wouldn't be difficult to make that a single column form.
EDIT: If you want to make two columns, you could use floats in your CSS.
move your <form...> to above the <table>
move your </form> to below the </table>
this may affect your styling a little bit...
if so, try it just below <table> and just above </table>
The point is that if you open a tag (the form) inside another tag (the first td), you must close the second tag (the form) before you close the first one (the first td).
Originally Posted by
nap0leon
move your <form...> to above the <table>
move your </form> to below the </table>
this may affect your styling a little bit...
if so, try it just below <table> and just above </table>
The point is that if you open a tag (the form) inside another tag (the first td), you must close the second tag (the form) before you close the first one (the first td).
WOW how stupid of me to miss that!. Thank you very much for pointing that out
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks