PDA

View Full Version : site validation- site code seems fine?!



jarv
Mar 23rd, 2009, 03:02 PM
I have just done a site validation check on my code (below) I have 9 errors, why?!



<!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" xml:lang="en" lang="en">
<head>
<title>NIG at BIBA 09 - Lets talk business</title>
<meta name="description" content="***" />
<meta name="keywords" content="***" />
<meta name="Content-Language" content="en-gb" />
<meta name="verify-v1" content="1FFa2iXDnaR1Qn+b71Bkbyhe82OkjBYy4X0B0B2+zcc=" />
<meta name="robots" content="FOLLOW,INDEX" />
<meta name="y_key" content="d8c5bed01e147103" />
<meta name="copyright" content="***" />
<meta name="author" content="***" />
<meta name="distribution" content="Global" />
<meta name="resource-type" content="document" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<link rel="stylesheet" type="text/css" href="css/site-style.css" />

<!--#include file="includes/functionlib.asp"-->
</head>

<body>
<div id="whitewrapper">
<div id="logoholder"><img src="images/logo.jpg" border="0" alt="Company logo" /></div>
<div id="navholder">
<ul>
<li><a href="#" class="defaultlink">Home</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Meet the Team</a></li>
<li><a href="#">Enter Prize Draw</a></li>
<li><a href="#">BIBA Website</a></li>
<li><a href="#">RBS Finsure</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
<div id="innerwrapper">
<div id="topmid">
<div id="topmidleft">
<div class="upper"><img src="images/broker-zone.jpg" border="0" alt="Broker Zone logo" align="left" /><br /><span style="font-size:16px; font-weight:bold;">NIG Broker Zone</span> <br /> Visit us at: <br /> <span style="font-weight:bold; font-size:14px;">Stand C2, BIBA 09,<br />Manchester Central</span><br />13th - 15th May 2009</div>
<div class="lower"><img src="images/biba-delivering-value.gif" border="0" alt="BIBA delivering Value" /><br /><img src="images/arrow.gif" border="0" alt="Arrow" /> <a href="#" title="link" target="_blank">Click here to register for tickets</a></div>
</div>
<div id="topmidright"></div>
</div>
<div id="bottomholder">
<div id="bottomleft"><div class="titleleft">bottomleft</div></div>
<div id="bottommid"><div class="titlemid">bottommid</div>
<div id="bottomright">bottomright</div>
</div>
</div>
<div id="footer">NIG is the trading name of the National Insurance Guarantee Corporation Ltd who are authorised and regulated by the Financial Services Authority, registration number 202263.<br />Our registered offices are Crown House, 145 City Road, London, EC1V 1LP. NIG is part of The Royal Bank of Scotland Group.</div>
</body>
</html>

BoldUlysses
Mar 23rd, 2009, 03:15 PM
The "Validation Output" section (http://validator.w3.org/check#result) of the validator will give you details about your validation errors.

At a glance, your issues come from the fact that you're using a strict DOCTYPE (good!) and are using markup attributes that aren't compatible with it, like align and border, properties which should be defined in your CSS stylesheet and not in the markup.

Beyond that, it looks like you're missing a closing tag for one of your divs (</div>).

nick1988
Mar 23rd, 2009, 04:48 PM
<a href="#" title="link" target="_blank">Test</a>

xhtml strict doesn't accept the target attribute.

Can get round it by using javascript to open it in a new window.


<a href="#" onclick="window.open(this.href);return false">Test</a>

This will open the link in a new window. If the user doesn't have javascript enabled it will still open the link, just in the original window.