HTML Tidy vs. W3C Markup Validator

Need technical advice on coding your web pages? Covers HTML, JavaScript, CSS, and some server side technologies. Also the issue of some webpages not displayed well.

Moderator: Don_HH2K

HTML Tidy vs. W3C Markup Validator

Postby Don_HH2K » Fri 24 Dec, 2004 9:41 pm

I was wondering which was a more reliable source, HTML Tidy or the W3C Markup Validator. I'm having a few conflicts between the two.

Let's take http://don.sillydog.com/index2.html as an example. The W3C Markup Validator reports that I have a valid standards-compliant page. If I run the same document on the same server through HTML Tidy, I get 49 error messages telling me I have markup that shouldn't be there. So, which one is a better choice?
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (Donzilla/0.2)
Laptop: HP Compaq nx6325 - Turion 64 X2 @ 2GHz, 2GB DDR2, 100GB HD, ATI Radeon X300, 15" LCD, Seven Pro
Handheld: Palm Treo 650 - Intel PXA270 @ 312MHz, 10MB RAM, 32MB flash, 2.7" LCD, Palm OS 5.4
User avatar
Don_HH2K
Moderator
Moderator
 
Posts: 5112
Joined: Sun 09 May, 2004 3:59 pm

Re: HTML Tidy vs. W3C Markup Validator

Postby akbash » Wed 29 Dec, 2004 8:20 pm

dluchini30 wrote:So, which one is a better choice?
To be sure, I don't know. But since no one else has answered...

I've always thought of the W3C Validator as kind of an official standard, and of tidy as more a, well, a tidying tool. I'd be more inclined to trust the W3CV for questions of compliance, but I don't have much support for that prejudice.

The errors you mention at don.sillydog.com are really only warnings; tidy isn't claiming your document is invalid. Strictly speaking, I'd say the W3CV is correct, your document doesn't break any of the hard rules of structure. But tidy is judging the document on an entirely different level. For example it just doesn't much like <big><big><big>. A bad childhood experience with Honeycomb, perhaps.

More to the point, tidy has noticed that there's no displayable content within the <big><big><big><span><span><span> sequence, and has decided to trim the overhead right out. I think you'll find if you insert some text within the innermost tags of that sequence in line 23, tidy gets a lot quieter about that line.

Maybe they're like virus scanners: two are better than one. Though in this case, and I haven't looked at all of tidy's complaints, tidy seems to be executing a handy kind of cleanup that's probably beyond the domain of the W3C Validators. Within the overlap of the two tools, I don't think there's any disagreement.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041227 Firefox/1.0+
akbash
silver member
silver member
 
Posts: 364
Joined: Mon 09 Feb, 2004 9:13 pm

Re: HTML Tidy vs. W3C Markup Validator

Postby akbash » Wed 29 Dec, 2004 8:21 pm

akbash wrote:
dluchini30 wrote:So, which one is a better choice?
To be sure, I don't know. But since no one else has answered...

I've always thought of the W3C Validator as kind of an official standard, and of tidy as more a, well, a tidying tool. I'd be more inclined to trust the W3CV for questions of compliance, but I don't have much support for that prejudice.

The errors you mention at don.sillydog.com are really only warnings; tidy isn't claiming your document is invalid. Strictly speaking, I'd say the W3CV is correct, your document doesn't break any of the hard rules of structure. But tidy is also judging the document on an entirely different level. For example it just doesn't much like <big><big><big>. A bad childhood experience with Honeycomb, perhaps.

More to the point, tidy has noticed that there's no displayable content within the <big><big><big><span><span><span> sequence, and has decided to trim the overhead right out. I think you'll find if you insert some text within the innermost tags of that sequence in line 23, tidy gets a lot quieter about that line.

Maybe they're like virus scanners: two are better than one. Though in this case, and I haven't looked at all of tidy's complaints, tidy seems to be executing a handy kind of cleanup that's probably beyond the domain of the W3C Validators. Within the overlap of the two tools, I don't think there's any disagreement.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041227 Firefox/1.0+
akbash
silver member
silver member
 
Posts: 364
Joined: Mon 09 Feb, 2004 9:13 pm

Postby akbash » Wed 29 Dec, 2004 8:22 pm

Ugh. Pilot error. My immediate previous post is just noise.
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041227 Firefox/1.0+
akbash
silver member
silver member
 
Posts: 364
Joined: Mon 09 Feb, 2004 9:13 pm

Postby Edward » Sun 20 Feb, 2005 5:51 pm

The W3C Validator at http://validator.w3.org/ should be considered official, and be used to check the validity of your web pages.

Before I published mine, I checked them against W3C to make sure they were error free.
UserAgent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.5) Gecko/20041217
SillyDog701 Moderator
debian - SeaMonkey - Sylpheed - Opera
User avatar
Edward
Moderator
Moderator
 
Posts: 3709
Joined: Sun 01 Dec, 2002 7:15 pm

Validation overrated

Postby webcoder82 » Fri 29 Apr, 2005 4:21 pm

This is a good article on the importance of validation. It also says that the w3c validator is more strict:

http://www.netbulge.com/index.php?sessi ... 1114367789
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
webcoder82
new member
new member
 
Posts: 1
Joined: Fri 29 Apr, 2005 4:18 pm


Return to Web Design and Page Coding

Who is online

Registered users: Google [Bot]