Forum Moderators: open

Message Too Old, No Replies

HTML Validators

What's best?

         

Stefan

2:56 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My apologies if this seems like a very newbie question, but I've been using [validator.w3.org...] and it is missing my mistakes.

I write everything in Wordpad, in straight html, then look at the pages carefully and run it through [validator.w3.org...] I was just working on a new page, using a previous one as a template, and noticed I'd missed a </td></tr> in the earlier page. The template I was using was in four pages and all of them have been online for a couple of months. Google and the other SE's found them, it rendered ok in a few browsers, and it validated supposedly, but I missed it for two months!

How do I find my inevitable mistakes doing my pages in Wordpad? Any suggestions would be greatly appreciated.

grahamstewart

3:04 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No mistake - your are allowed to miss out </td> and </tr>.
Look at the spec - they are marked as optional (though your right - it is good practise to keep them in).

All validators should be using the same DTDs (as published by W3C) so there really shouldn't be any difference in the validation they do.

However some produce better error messages than others and have better features.

The WDG Validator [htmlhelp.com] is useful because it can validate multiple pages in one go.

grahamstewart

3:06 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



BTW well done for writing your html by hand and for validating it. But you might want to consider a better text editor. A lot of people like [textpad.com...]

Stefan

3:21 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Many thanks, Graham.

Ok, that's why they validated... I didn't realize the closing tags on the cells and rows were optional. I'll keep putting them in anyway, but that explains it :-)

The textpad editor looks good, just had a glance at it, I'll try it. I've used the WDG but liked the w3.org one somewhat more.

One thing about writing pages in straight html is that they have a unique flavour :-)
(at least I like to think so...)

Staffa

5:30 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've sent you a sticky with a URL for a <tag> checker.

tedster

11:11 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Optional closing tags could always wreak havoc with some browsers. I remember that old Netscape and IE would incorrectly render <p align="right"> in some situations unless the </p> was included.

This business of optional closing tags always felt to me like a wrong direction from the W3C. And now with XHTML taking over in a few years, closing tags will be required for every element. So there's no reason to get bad habits now, and every reason to break them if you already have them. It gives the browser's rendering engine clear instructions and helps get a consistent page appearance.

It was only a few years ago that I started a discipline of always closing paragaph tags -- and only then I learned that a list could not nest inside a <p> but in fact implied a </p> when the list began.

Stefan

10:39 pm on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the help everyone. I have the URL for the tag checker Staffa, give thanks. Tedster, I'll keep closing the tags... good advice.