Need help with XHTML Valid Mark up

Discussion in 'HTML & Website Design' started by Cafefernando, Nov 26, 2007.

  1. #1
    Hi all - I need some advice on how to fix errors that I found via XHTML valid markup.
    This is for http://cafefernando.com/turkce
    I cleaned most of the errors, but the current ones just don't go away..

    1 -

    A major problem is the menu just below the header image. The boxes next to each other... The error specifies: end tag for element "a" which is not open.
    The code right now is something like:
    <a href="http://cafefernando.com/turkce"/><img alt="Anasayfa" title="Anasayfa" style="border:0" src="http://www.cafefernando.com/turkce/wp-content/themes/cafefernando/images/anasayfa.gif" /><a href="http://cafefernando.com/turkce/?page_id=2"/><img alt="Hakkımda" title="Hakkımda" style="border:0" src="http://www.cafefernando.com/turkce/wp-content/themes/cafefernando/images/hakkimda.gif" />......<a href="http://cafefernando.com"/><img alt="&#304;ngilizce" title="&#304;ngilizce" style="border:0" src="http://www.cafefernando.com/turkce/wp-content/themes/cafefernando/images/ingilizce.gif" /></a>

    When I remove the </a> at the end as suggested, the heading of the left column "Foodbuzz" turns into a link and two empty boxes appear next to it... Also the markup shows up new errors..

    2 - Same problem for the last image on the right sidebar. When I remove the </a> there appears an empty small box underneath and the last picture's link is ruined.

    3 - The other XML Parsing Errors - I have no clue as to what I should do at all...

    Any help would be greatly appreciated!
    Best
    Cenk
     
    Cafefernando, Nov 26, 2007 IP
  2. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #2
    #1 - You need to close the <a> elements after each of those images.
    Instead of <a><img/><a> you're going to have <a><img/></a><a>.

    #2 - Make sure it's not the same issue as #1, if it's not post the code.

    #3 - Handle the first one, see if it applies to the second one, then try again. Sometimes fixing certain errors will get rid of errors that only happen because of the first errors.
     
    joebert, Nov 26, 2007 IP
  3. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #3
    ^^Correct

    Your code should be:
    
    <a href="http://cafefernando.com/turkce"/><img alt="Anasayfa" title="Anasayfa" style="border:0" src="http://www.cafefernando.com/turkce/wp-content/themes/cafefernando/images/anasayfa.gif" /></a><a href="http://cafefernando.com/turkce/?page_id=2"/><img alt="Hakkımda" title="Hakkımda" style="border:0" src="http://www.cafefernando.com/turkce/wp-content/themes/cafefernando/images/hakkimda.gif" /></a>......<a href="http://cafefernando.com"/><img alt="İngilizce" title="İngilizce" style="border:0" src="http://www.cafefernando.com/turkce/wp-content/themes/cafefernando/images/ingilizce.gif" /></a>
    HTML:
     
    blueparukia, Nov 26, 2007 IP
  4. Cafefernando

    Cafefernando Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Did what you said... Nothing changed... What am I missing?
     
    Cafefernando, Nov 26, 2007 IP
  5. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #5
    I didn't catch the self-closing <a/> elements before.

    See how you have <a href="..."/> ?
    Take that forward slash off the end, so it's <a href="">.
     
    joebert, Nov 26, 2007 IP
  6. Cafefernando

    Cafefernando Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Wow! Thank you so much! There are only two errors left. Do you have any idea why they show up. I think it is related to the google search plugin.. Do I have to just remove it?
     
    Cafefernando, Nov 26, 2007 IP
  7. dancom96

    dancom96 Well-Known Member

    Messages:
    1,556
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    105
    #7
    If you just remove the Google search it'll work fine..
     
    dancom96, Nov 26, 2007 IP
  8. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #8
    Bah, I was hoping to get through this one without looking at the site. :D

    Attribute Construct errors, as far as I know, are always attributed to a missing space between the ending quote from one attribute, & the first letter of the next attributes name.

    For instance if you have
    <form action="action"method="post">
    Code (markup):
    It should actually be like this, with the space between them.
    <form action="action" method="post">
    Code (markup):
    In your case, it appears to be between the style and type attributes of your submit button.
     
    joebert, Nov 26, 2007 IP
  9. soulscratch

    soulscratch Well-Known Member

    Messages:
    964
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    155
    #9
    Except you shouldn't be using the name attribute on the form element itself, just form controls such as select, textarea, input.
     
    soulscratch, Nov 26, 2007 IP
  10. Cafefernando

    Cafefernando Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    How can I thank you enough? All errors gone! Thank you all.
     
    Cafefernando, Nov 27, 2007 IP