homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Is it impossible to completely validate my webpage?
HTML validation & browsers

 5:40 pm on Jan 31, 2006 (gmt 0)

A programmer told me that it is impossible to completely validate my webpage due to the many types of browsers. At best, I could hope for around 20 errors.

Is this true?



 6:08 pm on Jan 31, 2006 (gmt 0)

Not really. The code is the code. Validation has nothing to do with which browser you use to check.

Perhaps what he meant was that in order to get your page to display the way you want it, this would result in about 20 validation errors because of using hacks or something.


 4:17 am on Feb 1, 2006 (gmt 0)

A programmer told me...

The programmer is wrong. Whatever you are doing, it can probably be done in a way that will pass the test [validator.w3.org].

Strict W3C validation is overrated... sometimes you want to put a <form> inside a <p>, and I say, go ahead. It will render fine in every browser. Some rules are more flexible than others; I will tolerate some invalid block-level stuff, but I hate seeing improperly nested tags
e.g. <b><i>text</b></i>


 7:52 am on Feb 2, 2006 (gmt 0)

Welcome aboard shimsand, no it's not impossible. I'm a perl programmer and can tell you yes, you can ALWAYS figure out a way to validate the code. Sometimes it requires rethinking the way you are doing things, but next time, you will bring this knowledge with you. Hang around here long enough, it will rub off on you.

This really makes me curious - "many types of browsers?" Valdating your code has nothing (really) to do with browser types unless you're using proprietary code, meaning things that work only in one browser. Then you've got a lot of browser-identifying Javascript or something and it's a bad idea anyway.


 1:10 pm on Feb 2, 2006 (gmt 0)

Most of my pages are 100% valid, so it is not impossible.


 1:21 pm on Feb 2, 2006 (gmt 0)

Of course it is possible to validate, it's just that I've not yet seen a decent design that is completely valid...

Then try and get it completely Bobby compatible <jesus>

I also think the focus on having a site completely validated to strict standards is completely over rated... the point of a site is to sell .. your product, your content, your idea etc .. to your target audience .. that is the most important thing, to have them engaged and eager to return...

Not saying lovely code is not nice.. Just, no need to panic if it's not...


 2:21 pm on Feb 2, 2006 (gmt 0)

There are some daft specifications that can be ignored and there are critical errors that should always be corrected. It's a matter of common sense and personal preference.

e.g. under XMTL strict there is no target attribute.
e.g. <NOSCRIPT> is not permitted in the <HEAD>
e.g. frame borders of zero width are not permitted (but the W3C validator passes them!).

All of these are utterly ludicrous, and there are probably many more examples.

Validation failure resulting from stupid standards is very different to validation failure resulting from bad markup.



 3:00 pm on Feb 2, 2006 (gmt 0)

If a page contains 'errors' (non-valid markup) then the browser can display the 'error' in a way that they want to - i.e. an error in the code makes the way a browser shows your page undefinable and may change from one minor version to the next.

E.g) <td><a href='...'><b>This is </b> a link</td>

Here, I have opened the <a> tag to create a link. But where should the browser close the link?

1) It could close it after the </b>, assuming that the boldness indicates where a link should be.
2) It could close it just before the </td>, assuming that the table cell is the end of the link.
3) It could continue the link until an </a> is found, assuming that the writer wanted the link to cover various table cells.

None of the above would be wrong for a browser. The code is wrong and the browser can now make it's own decision with what to do with the code.

There are other 'errors' which some programs will display which technically are not errors or are being very picky:

a) <span class='bold'></span>
b) <a href='x.cgi?a=1&b=2'>

In a, the span is empty and therefore pointless and redundant, but is not really an error.

In b, any browser should see the link as above, but the W3C would say that the '&' should be written out as an entity: '&amp;'. This is probably not needed & would be ok in almost every circumstance.

Usually these are called 'Errors' and 'Warnings'. If your page has 'Errors' - your programmer should be adjusting the code. If it has warnings, then the HTML is probably OK, just not quite perfect, but acceptable.


 3:49 pm on Feb 2, 2006 (gmt 0)

I have a page that validates just fine, but it won't render correctly in Safari, no matter what I do to it. So I don't think one necessarily has to do with the other.


 3:56 pm on Feb 2, 2006 (gmt 0)

I've not yet seen a decent design that is completely valid

The entire CSS Zen Garden [csszengarden.com] is 100% W3C compliant valid HTML.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved