Validation Problem

I have a problem with my page trying to validate it.
If I validate my page using direct input I get no errors, but if I validate the same page by URL I get 9 errors:

Line 101, Column 49: unclosed start-tag requires SHORTTAG YES
…a href=“http://summerlime.com/?p=340” <strong>Next work ></strong> </a></li> …
:email:
The construct <foo<bar> is valid in HTML (it is an example of the rather obscure “Shorttags” feature) but its use is not recommended. In most cases, this is a typo that you will want to fix. If you really want to use shorttags, be aware that they are not well implemented by browsers.

Line 101, Column 48: error parsing attribute name
…<a href=“http://summerlime.com/?p=340” <strong>Next work ></strong> </a></li> …
:email:
Line 101, Column 48: attributes construct error
…<a href=“http://summerlime.com/?p=340” <strong>Next work ></strong> </a></li> …
:email:
Line 101, Column 48: Couldn’t find end of Start Tag a line 101
…<a href=“http://summerlime.com/?p=340” <strong>Next work ></strong> </a></li> …
:email:
Line 101, Column 80: Opening and ending tag mismatch: li line 101 and a
…=“http://summerlime.com/?p=340” <strong>Next work ></strong> </a></li> </ul>
:email:
Line 101, Column 80: Opening and ending tag mismatch: ul line 97 and li
…=“http://summerlime.com/?p=340” <strong>Next work ></strong> </a></li> </ul>
:email:
Line 101, Column 81: Opening and ending tag mismatch: div line 83 and ul
…=“http://summerlime.com/?p=340” <strong>Next work ></strong> </a></li> </ul>
:email:
Line 111, Column 10: Opening and ending tag mismatch: body line 41 and div
</div>
:email:
Line 133, Column 8: Opening and ending tag mismatch: html line 3 and body
</body>
:email:
Line 134: Extra content at the end of the document
</html>

Here is the source:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” dir=“ltr” lang=“en-US”>
<head profile=“http://gmpg.org/xfn/11”>
<title>
Bioaktiv </title>

    &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8" /&gt; 
	&lt;meta name="description" content="" /&gt; 
			&lt;link rel="stylesheet" type="text/css" href="http://summerlime.com/wp-content/themes/Summerlime/style.css" media="screen" /&gt; 
	&lt;link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://summerlime.com/?feed=rss2" /&gt; 
	&lt;link rel="alternate" type="text/xml" title="RSS .92" href="http://summerlime.com/?feed=rss" /&gt; 
	&lt;link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="http://summerlime.com/?feed=atom" /&gt; 

	&lt;script src="http://summerlime.com/wp-content/themes/Summerlime/style/scripts/jquery-1.2.6.min.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; 
	&lt;script src="http://summerlime.com/wp-content/themes/Summerlime/style/scripts/jquery.scrollTo-1.4.0-min.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; 
	&lt;script src="http://summerlime.com/wp-content/themes/Summerlime/style/scripts/jquery.localscroll-1.2.6-min.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; 
	&lt;script src="http://summerlime.com/wp-content/themes/Summerlime/style/scripts/jquery.serialScroll-1.2.1-min.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; 
	&lt;script src="http://summerlime.com/wp-content/themes/Summerlime/style/scripts/coda-slider.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; 

	
	&lt;meta name='robots' content='noindex,nofollow' /&gt; 

<link rel=“alternate” type=“application/rss+xml” title=“Summerlime » Bioaktiv Comments Feed” href=“http://summerlime.com/?feed=rss2&amp;p=343” />
<link rel=“EditURI” type=“application/rsd+xml” title=“RSD” href=“http://summerlime.com/xmlrpc.php?rsd” />
<link rel=“wlwmanifest” type=“application/wlwmanifest+xml” href=“http://summerlime.com/wp-includes/wlwmanifest.xml” />
<link rel=‘index’ title=‘Summerlime’ href=‘http://summerlime.com’ />
<link rel=‘start’ title=‘Canem Systems’ href=‘http://summerlime.com/?p=283’ />
<link rel=‘prev’ title=‘New Diesel’ href=‘http://summerlime.com/?p=340’ />
<meta name=“generator” content=“WordPress 2.9.1” />
<link rel=‘canonical’ href=‘http://summerlime.com/?p=343’ />

<!-- Start Of Script Generated By cforms v11.3 [Oliver Seidel | www.deliciousdays.com] –>
<script type=“text/javascript” src=“http://summerlime.com/wp-content/plugins/cforms/js/cforms.js”></script>
<!-- End Of Script Generated By cforms –>

&lt;/head&gt; 

&lt;body&gt; 
&lt;div id="container"&gt; 


	&lt;!-- HEADER --&gt;	
	
	&lt;div id="header"&gt; 
    	&lt;div id="header_img"&gt; 
		&lt;h1&gt;&lt;a href="http://summerlime.com"&gt;Summerlime&lt;/a&gt;&lt;/h1&gt; 

		&lt;p&gt;&lt;/p&gt; 
        &lt;/div&gt; 
	&lt;/div&gt;&lt;!-- #header --&gt; 
	
	
	&lt;!-- NAVIGATION --&gt; 


	&lt;div id="navigation"&gt; 
		&lt;div id="menu"&gt; 
			&lt;ol&gt; 
				&lt;li&gt;&lt;a  href="http://summerlime.com/" title="Home page"&gt;HOME&lt;small&gt;Our home page&lt;/small&gt;&lt;/a&gt;&lt;/li&gt; 

				&lt;li&gt;&lt;a  href="http://summerlime.com/?page_id=2" title="Services page"&gt;SERVICES&lt;small&gt;What we do&lt;/small&gt;&lt;/a&gt;&lt;/li&gt; 
                
				&lt;li&gt;&lt;a  href="http://summerlime.com/?page_id=12" title="Portfolio page"&gt;PORTFOLIO&lt;small&gt;View our work&lt;/small&gt;&lt;/a&gt;&lt;/li&gt; 

				&lt;li id="menulast"&gt;&lt;a  href="http://summerlime.com/?page_id=76" title="Contact page"&gt;CONTACT&lt;small&gt;Get in touch&lt;/small&gt;&lt;/a&gt;&lt;/li&gt; 
			&lt;/ol&gt; 

			&lt;/div&gt;&lt;!-- #menu --&gt; 
	&lt;/div&gt;&lt;!-- #navigation --&gt; 
						


	&lt;div id="content"&gt; 

		&lt;!-- Ct-Info --&gt; 
		&lt;div id="ct-info"&gt; 
			&lt;p&gt;&lt;a href="http://summerlime.com/wp-content/uploads/2010/03/bioaktiv.jpg"&gt;&lt;img class="alignnone size-full wp-image-311" title="bioaktiv" src="http://summerlime.com/wp-content/uploads/2010/03/bioaktiv.jpg" alt="" width="650" height="515" /&gt;&lt;/a&gt;&lt;/p&gt; 
		&lt;/div&gt; 

		&lt;div id="sidebar"&gt; 
	
					
								&lt;dl&gt; 
												&lt;dt&gt;&lt;strong&gt;Client&lt;/strong&gt;:&nbsp;&lt;/dt&gt; 
						&lt;dd&gt;Bioaktiv&lt;/dd&gt; 
								
											&lt;dt&gt;&lt;strong&gt;Project type&lt;/strong&gt;:&nbsp;&lt;/dt&gt; 
					&lt;dd&gt;Web&lt;/dd&gt; 
								
											&lt;dt&gt;&lt;strong&gt;Delivered&lt;/strong&gt;:&nbsp;&lt;/dt&gt; 
					&lt;dd&gt;Logo, Stationary, Website&lt;/dd&gt; 
										&lt;/dl&gt; 
							
			&lt;ul&gt; 

				
				
				&lt;li&gt;&lt;a href="http://summerlime.com/?p=340" &gt;&lt;strong&gt;Next work &gt;&lt;/strong&gt; &lt;/a&gt;&lt;/li&gt;				&lt;/ul&gt; 
            
            
            &lt;div id="back_portfolio"&gt;&lt;a href="?page_id=12"&gt;&lt;img src="wp-content/uploads/2010/03/view_portfolio.png" width="148" height="53" alt="Back to Portfolio"/&gt;&lt;/a&gt;&lt;/div&gt; 
			
		&lt;/div&gt;&lt;!-- #sidebar --&gt; 
	&lt;/div&gt;&lt;!-- #content --&gt; 
	

    	&lt;div id="push"&gt;&lt;/div&gt;	
&lt;/div&gt; 

 <div id=“footer”>
<div id=“foot”>

			&lt;ol id="footnav"&gt; 
				&lt;li&gt;&lt;a  href="http://summerlime.com/" title="Home page"&gt;&lt;strong&gt;HOME&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt; 
				&lt;li&gt;|&lt;/li&gt; 
				&lt;li&gt;&lt;a  href="http://summerlime.com/?page_id=2" title="Services page"&gt;&lt;strong&gt;SERVICES&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt; 
				&lt;li&gt;|&lt;/li&gt; 
				&lt;li&gt;&lt;a  href="http://summerlime.com/?page_id=12" title="Portfolio page"&gt;&lt;strong&gt;PORTFOLIO&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt; 
                &lt;li&gt;|&lt;/li&gt; 
				&lt;li&gt;&lt;a  href="http://summerlime.com/?page_id=76" title="Contact page"&gt;&lt;strong&gt;CONTACT&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt; 
			&lt;/ol&gt; 

			&lt;p&gt;All contents © Copyright 2010 &lt;a href="http://www.summerlime.com" title="Summerlime"&gt;Summerlime&lt;/a&gt;. All rights reserved.&lt;/p&gt; 
							
		&lt;/div&gt;&lt;!-- #foot --&gt; 
	&lt;/div&gt;&lt;!-- #footer --&gt; 
	&lt;!--
	&lt;/div&gt;

–>
</body>
</html>

If anybody knows why this might be happening please share. I’ve been trying to clean my site so it validates and this is the last piece that’s causing problems. Thanks.

Note the error message source quote:

<a href=“http://summerlime.com/?p=340” <strong>

Notice the anchor is not closed prior to the <strong> element. The validator mentions this is legal syntax technically, but ….

You didn’t post a link, and the home page in the nav did not match the posted source. If that doesn’t fix things, give us the url you’re trying to validate.

cheers,

gary

Try:



<!-- adding this to your header -->
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 

<!-- replacing  the  copyright -->
&#169; with &copy;


http://validator.w3.org/check?uri=http%3A%2F%2Fanetizer.com%2Fdownloads%2Fsp-a%2Ftest%2Findex-001.php&charset=%28detect+automatically%29&doctype=Inline&ss=1&outline=1&group=0&verbose=1&user-agent=W3C_Validator%2F1.767

.

.

I’ve actually noticed that too, but if you look in the source you will see it’s actually closed. There’s a title element afterwards too. At least I didn’t see any tags that wouldn’t be closed. I think it’s just the validator that cuts off rest of the code.

Here’s the url I’m trying to validate: http://summerlime.com/?p=343

If you view the source on this page and try to validate it it should come up with no errors, but if you just input this url it’ll give you 9 errors. I must be missing something.

What you have:

<a href="http://summerlime.com/?p=340" <strong>Next work [color=red][b]>[/b][/color]</strong> </a>

You’re missing a ‘>’ at the end of the <a> tag. Actually, it’s inside the <strong> tag!

What you should have

<a href="http://summerlime.com/?p=340"[color=red][b]>[/b][/color]<strong>Next work</strong></a>

That is actually character that is supposed to be in there. I know I should be using “&lt” or whatever it is but I’ve tried it and it didn’t solve anything. So I’m guessing it must something else and like I said if you look in the source code you will see that it is properly closed and there is “title” after the link which you can’t see in what validator outputs.

The main problem is the missing ‘>’ at the end of the anchor tag, just before the <strong> start tag.

If you mean to have the literal ‘>’ in the anchor text, then use

<a href="http://summerlime.com/?p=340"[color=red][b]>[/b][/color]<strong>Next work [color=red][b]>[/b][/color]</strong></a>

I tried changing to “&gt”, no luck. I’m really not sure how the validator does it, cause in the source everything looks good and I’m guessing that’s why the source code validates. But with the URL it gets rid of the closing “>”

I think the validator is getting confused with “&gt” because it expects a trailing “;”

Try this:



	
<li>
   <a href="http://summerlime.com/?p=340">
     <strong>
        Next work >
     </strong>
    </a>
</li>


.

Tried adding “;” too, now I get 8 errors instead of 9, so I guess that’s an improvement right? :slight_smile: There’s got to be something that’s causing this. With my other pages when I had errors on them it was usually just one thing I had to fix and all of the errors on that page would be fixed.

Your problem as mentioned in one of my previous posts was because of the copyright symbol. It has not been changed and causing the problems.

Here is the validated source:
http://www.anetizer.com/downloads/sp-a/test/index-002.php

and the validator results:

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.anetizer.com%2Fdownloads%2Fsp-a%2Ftest%2Findex-002.php&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.767

.

Hmm, I’m not sure I know what you mean with the copyright. Would you mind explaining what needs to be replaced?

The copyright symbol doesn’t need changing as you are using and serving as UTF-8 and thus can directly enter the symbol (as is) but for some ‘encodings’ you may have to enter it as a ‘character entity reference’, etc.

That’s what he meant but obviously didn’t notice you were using UTF-8 or wouldn’t have said that.

While I suppose it’s possible the validator dropped a character, I’ve not seen it.

Let me copy/paste from your page’s source:

<li><a href="http://summerlime.com/?p=340"<strong>Next work ></strong> </a></li>

The source is missing the “>”.Compare to what it should be:

<li><a href="http://summerlime.com/?p=340"[color=red]>[/color]<strong>Next work ></strong> </a></li>

cheers,

gary

I see… Thanks for the clarification. So that leaves me back at the beginning. Any other solutions anyone?

Thanks garry, but I really don’t know how can that be. Just looked at my source and the closing “>” is there. I’m attaching a screenshot of the source with the closing character highlighted.

Just which source are you looking at? Are you viewing the website in your browser, then viewing the source as the browser sees it? Or are you viewing your local source?

The site page’s source, as I see it, is exactly the same as the source that the W3 validator is seeing.

cheers,

gary

Off Topic:

I just noticed that my previous post was almost word for word identical to Tommy’s. :shrug: See, geniuses tend to think alike. :smiley:

The source url is visible in the image I posted. I went to http://summerlime.com/?p=340 and viewed source.

Not that it likely matters, but your screen cap is of a different page. Either way, viewing source produces the same markup as before. To double check, I went to Opera’s view source for comparison against what Firefox is showing, and Opera agrees. Google-Chrome, on the other hand, does show the right bracket. I am inclined to believe it is not actually there, but that Chrome adds it as an error fix for the DOM.

From which browser are you viewing the source? Have you closely inspected the PHP code or the Smarty code (if you’re using the templating engine—which I think you should)? I suspect the bracket is missing for both the previous and next links.

BTW, you should add the rel attribute with ‘next’ and ‘prev’ values for user friendliness.

cheers,

gary

You’re exactly right gary, I got everything validating and the closing bracket was in fact missing. I checked my php files before, but didn’t think there was supposed to be closing bracket just before the previous / next link. And the fact that chrome inserts it when it’s missing only confused me more, as I didn’t know about it until now. I should’ve checked other browsers… Anyways all is well now, so thanks a lot for all your help.