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="İngilizce" title="İ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
#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.
^^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:
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="">.
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?
Bah, I was hoping to get through this one without looking at the site. 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.
Except you shouldn't be using the name attribute on the form element itself, just form controls such as select, textarea, input.