SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Oct 2005
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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 &copy; 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&amp;url1=http%3A//mysite.com" onclick="window.open(this.href); return false">WAI</a> |&nbsp;<a title="Section 508" href="http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&amp;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

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.

  3. #3
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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 &copy; 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&amp;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&amp;url1=http%3A%2F%2Fmysite.com"onclick="window.open(this.href); return false">508</a></li>
    	</ul>
    </div>

  4. #4
    SitePoint Addict
    Join Date
    Oct 2005
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah i think you may be right, i will go through code again.

    Thanks

  5. #5
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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
    Simon Pieters

  6. #6
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Huh, didn't notice that. Then again, I only really looked at it for about 10 seconds.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •