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=“” <strong>Next work ></strong> </a></li> …
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=“” <strong>Next work ></strong> </a></li> …
Line 101, Column 48: attributes construct error
…<a href=“” <strong>Next work ></strong> </a></li> …
Line 101, Column 48: Couldn’t find end of Start Tag a line 101
…<a href=“” <strong>Next work ></strong> </a></li> …
Line 101, Column 80: Opening and ending tag mismatch: li line 101 and a
…=“” <strong>Next work ></strong> </a></li> </ul>
Line 101, Column 80: Opening and ending tag mismatch: ul line 97 and li
…=“” <strong>Next work ></strong> </a></li> </ul>
Line 101, Column 81: Opening and ending tag mismatch: div line 83 and ul
…=“” <strong>Next work ></strong> </a></li> </ul>
Line 111, Column 10: Opening and ending tag mismatch: body line 41 and div
Line 133, Column 8: Opening and ending tag mismatch: html line 3 and body
Line 134: Extra content at the end of the document

Here is the source:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN””>
<html xmlns=“” dir=“ltr” lang=“en-US”>
<head profile=“”>
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="" media="screen" /&gt; 
	&lt;link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="" /&gt; 
	&lt;link rel="alternate" type="text/xml" title="RSS .92" href="" /&gt; 
	&lt;link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="" /&gt; 

	&lt;script src="" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; 
	&lt;script src="" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; 
	&lt;script src="" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; 
	&lt;script src="" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; 
	&lt;script src="" 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=“;p=343” />
<link rel=“EditURI” type=“application/rsd+xml” title=“RSD” href=“” />
<link rel=“wlwmanifest” type=“application/wlwmanifest+xml” href=“” />
<link rel=‘index’ title=‘Summerlime’ href=‘’ />
<link rel=‘start’ title=‘Canem Systems’ href=‘’ />
<link rel=‘prev’ title=‘New Diesel’ href=‘’ />
<meta name=“generator” content=“WordPress 2.9.1” />
<link rel=‘canonical’ href=‘’ />

<!-- Start Of Script Generated By cforms v11.3 [Oliver Seidel |] –>
<script type=“text/javascript” src=“”></script>
<!-- End Of Script Generated By cforms –>


&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=""&gt;Summerlime&lt;/a&gt;&lt;/h1&gt; 

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

	&lt;div id="navigation"&gt; 
		&lt;div id="menu"&gt; 
				&lt;li&gt;&lt;a  href="" 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="" 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="" 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="" title="Contact page"&gt;CONTACT&lt;small&gt;Get in touch&lt;/small&gt;&lt;/a&gt;&lt;/li&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=""&gt;&lt;img class="alignnone size-full wp-image-311" title="bioaktiv" src="" alt="" width="650" height="515" /&gt;&lt;/a&gt;&lt;/p&gt; 

		&lt;div id="sidebar"&gt; 
											&lt;dt&gt;&lt;strong&gt;Project type&lt;/strong&gt;:&nbsp;&lt;/dt&gt; 
					&lt;dd&gt;Logo, Stationary, Website&lt;/dd&gt; 

				&lt;li&gt;&lt;a href="" &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;	

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

			&lt;ol id="footnav"&gt; 
				&lt;li&gt;&lt;a  href="" title="Home page"&gt;&lt;strong&gt;HOME&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt; 
				&lt;li&gt;&lt;a  href="" title="Services page"&gt;&lt;strong&gt;SERVICES&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt; 
				&lt;li&gt;&lt;a  href="" title="Portfolio page"&gt;&lt;strong&gt;PORTFOLIO&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt; 
				&lt;li&gt;&lt;a  href="" title="Contact page"&gt;&lt;strong&gt;CONTACT&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt; 

			&lt;p&gt;All contents © Copyright 2010 &lt;a href="" 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; 


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=“” <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.




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

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



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:

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="" <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=""[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=""[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:

   <a href="">
        Next work >


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:

and the validator results:


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=""<strong>Next work ></strong> </a></li>

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

<li><a href=""[color=red]>[/color]<strong>Next work ></strong> </a></li>



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.



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 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.



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.