View Full Version : Validating Page.

02-10-2008, 10:07 PM
Hello, can anyone validate this page for me please? The link is http://www.athletes4excellence.com/indexxxxxx.php

Thank you.

02-10-2008, 10:33 PM

Why would you post this?

02-10-2008, 11:14 PM
Thanks, however, I have tried it many times, and it does not seem to work for me, or I don't understand how it works. I also wanted this to be sort of like "site reviews", like they have it on codingforums.com

02-10-2008, 11:22 PM
if you check the "show HTML tidy" it will show the "improved" version of your page (most likely on the bottom)

02-11-2008, 12:19 AM

You put your address in the box and click validate. I did nothing special.

And when it says there are errors, yes, there are errors, and no you didn't enter it incorrectly.

139 errors... ^_^

And you should ask for a review if you want one, but I'd recommend removing the majority of the errors first.

02-11-2008, 03:43 AM
First step: switch to HTML 4.01 Strict. Second step: fix the errors. :)

02-11-2008, 04:16 AM
Oddly enough, that puts it down to 40 errors, most of which are very easy to fix.

02-11-2008, 05:45 AM
Take a look at this. (http://www.ilovejackdaniels.com/design/on-the-fly-validation/) Oh, and read it at least 50 times before replying "How does this work?"

02-11-2008, 06:46 AM
Don't use that (except perhaps as a checklist for manually validating your page, or a tool for checking it automatically). You want valid HTML, not invalid HTML hackishly (and slowly, too -- remember all those regexes are happening on every page view, and regexes are terribly expensive) rendered into valid HTML. Either way, HTML Tidy (http://tidy.sourceforge.net/) will do the job better.

02-12-2008, 05:24 AM
HTML Tidy can't validate dynamically created pages though. Perhaps make it validate, then store a cached version of it.

02-12-2008, 05:29 AM
Of course it can. As with your regex solution, though, it shouldn't be used on the fly.

02-12-2008, 08:41 AM
Er, no it can't. You enter text. It goes into a database. The HTML Tidy can't validate that without user intervention. The solution I gave does it on the fly, so you can add stuff like blog entries without having to re-validate it all the time.

02-12-2008, 09:05 AM
There are even PHP bindings for Tidy to avoid having to run it through an external application: http://www.php.net/tidy

afe was talking about validating an actual page, though, not user input (which would be a fair reason to do it on the fly, but your users a) shouldn't be submitting HTML and b) will probably not have their input validated perfectly, even with Tidy).