-
Error in footer code
Hi,
Im getting this one error when trying to validate strict:
Element type "a" must be followed by either attribute specifications, ">" or "/>".
I dont understand what ive done wrong heres my footer code:
Code:
<div id="footer"> Copyright © 2006 TR. All Rights Reserved. UK Design | Validation - <a title="Valid XHTML" href="http://validator.w3.org/check?uri=http%3A//www.mysite.com/" onclick="window.open(this.href); return false">XHTML</a> | <a title="Valid CSS" href="http://jigsaw.w3.org/css-validator/validator?uri=http://www.mysite.com/" onclick="window.open(this.href); return false">CSS</a> | <a title="Web Content Accessibility" href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=2&url1=http%3A//mysite.com" onclick="window.open(this.href); return false">WAI</a> | <a title="Section 508" href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&url1=http%3A%2F%2Fmysite.com"onclick="window.open(this.href); return false">508</a>
If anyone can tell me how to sort this out that would be great!
Thanks
-
Hello
Are you sure that is where the error is coming from, as there are none in that snippet. Or at least I do not see any.
-
You probably forgot to close the <div> container. Also, you have a list of links in there. Marking them up as such would be more semantic. Here's an example (be sure to style as needed if you use it):
HTML Code:
<div id="footer">
<p>Copyright © 2006 TR. All Rights Reserved. UK Design</p>
<h4>Validation</h4> <!-- or whatever header level is appropriate given your site's structure -->
<ul>
<li><a title="Valid XHTML" href="http://validator.w3.org/check?uri=http%3A//www.mysite.com/" onclick="window.open(this.href); return false">XHTML</a></li>
<li><a title="Valid CSS" href="http://jigsaw.w3.org/css-validator/validator?uri=http://www.mysite.com/" onclick="window.open(this.href); return false">CSS</a></li>
<li><a title="Web Content Accessibility" href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=2&url1=http%3A//mysite.com" onclick="window.open(this.href); return false">WAI</a></li>
<li><a title="Section 508" href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&url1=http%3A%2F%2Fmysite.com"onclick="window.open(this.href); return false">508</a></li>
</ul>
</div>
-
Ah i think you may be right, i will go through code again.
Thanks
-
What validator are you using?
In any case, for XHTML there should be whitespace between the attributes in the last <a> element:
Code:
...%3A%2F%2Fmysite.com"onclick="window.open...
-----------------------^ missing whitespace
-
Huh, didn't notice that. Then again, I only really looked at it for about 10 seconds.