Welcome to WebmasterWorld Guest from 54.221.119.45

Forum Moderators: incrediBILL

Message Too Old, No Replies

Is it impossible to completely validate my webpage?

HTML validation & browsers

     

shimsand

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

5+ Year Member



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?

faltered

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

10+ Year Member



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.

httpwebwitch

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

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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>

rocknbil

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

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

katana_one

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

10+ Year Member



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

Lobo

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

10+ Year Member



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

kaled

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

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

Kaled.

PCInk

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

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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.

netmeg

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

WebmasterWorld Senior Member netmeg is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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.

httpwebwitch

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

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month