PDA

View Full Version : validator question (simple)



james438
08-25-2007, 08:59 AM
would you say that getting a site w3c valid will make a script 99% cross browser compatible?

jscheuer1
08-25-2007, 09:57 AM
No. The validation process doesn't check your script code for javascript errors or good coding practices. You could have a valid page with a totally non-working script on it.

james438
08-25-2007, 06:56 PM
could someone remind me again why getting a site w3c validated is important?

thetestingsite
08-25-2007, 07:09 PM
To my understanding, it is to make the site layout/design compatible with most (if not all) modern browsers. Not 100% on this though.

boxxertrumps
08-25-2007, 07:40 PM
If your webpage is standards compliant, it should display almost the same in standards compliant browsers.
If there were no standards, the web would have nearly no benefit, other than transmitting plain text.

djr33
08-25-2007, 08:02 PM
It's also very helpful when you post on this site, so that we don't have to guess what random techniques you've used to hack the html into working. If it's standard html, then it's usually fairly easy to figure out what is wrong with a page or what to add. If it isn't standard, there's no guarantee that code we fix/add will work.

Twey
08-25-2007, 08:18 PM
If there were no standards, the web would have nearly no benefit, other than transmitting plain text.It wouldn't do that either -- ASCII, Latin1, and all the other, more advanced encodings, are all standards :) The only thing that is transmitted is streams of electricity. Standards make the Internet go 'round.

jscheuer1
08-25-2007, 08:44 PM
could someone remind me again why getting a site w3c validated is important?

I think all of the answers given so far to the above question are good, if incomplete.



If there were no standards, the web would have nearly no benefit, other than transmitting plain text.It wouldn't do that either -- ASCII, Latin1, and all the other, more advanced encodings, are all standards :) The only thing that is transmitted is streams of electricity. Standards make the Internet go 'round.

I'm singling you out Twey, because I like you, and I think you should know better. What I said above goes for you too, good (even true in a way), but incomplete. One thing I think should be added to it is that standards are one of the things that make the web work. Obviously, standards alone will not a world wide web make. Even though standards, in principal, allow for accessibility, it is the flexibility and general efficacy of browsers that extend that to those not rigorously schooled in the standards. Content providers are essential. I could go on and on, but it is likely a complete answer would be either impossible or extremely long.

So, my additional 2 cents on the original question quoted at the top of this post:

Validating your code vastly reduces the uncertainties involved in sharing it with others, and with publishing it for consumption via user agents (browsers, etc.) who/that understand valid code.

It is no substitute for effort and knowing what you are doing, but it almost always can work with and enhance that.

Still incomplete, but I'm trying to watch a ballgame. :)

james438
08-25-2007, 09:33 PM
Lots of different and good reasons. I guess I just needed a bit of a reminder because I was getting a bit bogged down with all of the errors on my site. This is the first time that I am really trying to get my site standards compliant after two years of working on it.

jscheuer1
08-25-2007, 09:56 PM
Lots of different and good reasons. I guess I just needed a bit of a reminder because I was getting a bit bogged down with all of the errors on my site. This is the first time that I am really trying to get my site standards compliant after two years of working on it.

If you need help validating a particular effect/attribute/tag, etc., that's part of why we are here, just ask. There are alternatives to most things that don't validate, and reasons why to avoid those things that just can't be validated*. After you get a bit of experience under your belt, validation isn't nearly such a big deal. Think of it as a spell checker.



*Some things you may think that you 'need to have' just cannot be validated to a particular standard. If you really need to use it, you should use a less strict DOCTYPE for that page to protect it from being degraded before its time.

Twey
08-25-2007, 10:12 PM
I'm singling you out Twey, because I like you, and I think you should know better.I'm glad to hear it :)
What I said above goes for you too, good (even true in a way), but incomplete. One thing I think should be added to it is that standards are one of the things that make the web work. Obviously, standards alone will not a world wide web make. Even though standards, in principal, allow for accessibility, it is the flexibility and general efficacy of browsers that extend that to those not rigorously schooled in the standards. Content providers are essential.I disagree entirely (not in that standards alone are necessary for the Web, but in that error-correcting in browsers is necessary). Error-correcting is an endless circle: browsers tolerate sloppy code, therefore authors write sloppy code, therefore browsers tolerate it. If a browser adheres strictly to the standards today, it won't even be able to render most of the Web. However, this is not an indication of the usefulness of standards. Had browsers not introduced this mindless tolerance for sloppiness that bulks out their code so much today, the browsers of today would not require it. Authors would produce proper, valid code (which really isn't all that difficult to produce; in fact, valid code is easier to produce than invalid code, since it makes more sense logically than invalid). It's not necessary to know the standards inside out; that's what the validator is for. Something I always slip up on, for example, is putting form elements inside an additional block-level element. When run through the validator, such code will produce a very clear error message: "missing one of ...."

I don't believe that browsers should stick rigidly to standards. I'm all for extensions like <canvas> and so on. That is, after all, how progress is made: if they're considered worthy, they become part of the next standard, and can be used in general-purpose web pages for large audiences. However, proprietary extensions and error correction are very different things. There is no need for error correction and it makes the lives of users, web developers, and browser developers alike more difficult.

jscheuer1
08-25-2007, 10:26 PM
However, proprietary extensions and error correction are very different things. There is no need for error correction and it makes the lives of users, web developers, and browser developers alike more difficult.

Proprietary extensions and error correction are two different things. Virtually all browsers have either proprietary extensions, and/or things that they do in a somewhat unique way. As you point out, this opens the way for improvement/change/evolution. Error correction opens the web (somewhat) as a medium to those not so inclined to learning about a thing before doing it. There are an incredible number of people like that, and no, they are not all idiots with nothing worthwhile to offer.

Twey
08-25-2007, 10:47 PM
There are an incredible number of people [who can't be bothered to learn HTML], and no, they are not all idiots with nothing worthwhile to offer.I'm sure they aren't. I'm equally sure they'd still have it to offer after taking half an hour to learn HTML, or even learning it as they go.

jscheuer1
08-25-2007, 11:19 PM
There are an incredible number of people (sic: who can't be bothered to learn HTML (sic: and other web technical info)), and no, they are not all idiots with nothing worthwhile to offer.I'm sure they aren't. I'm equally sure they'd still have it to offer after taking half an hour to learn HTML, or even learning it as they go.

I had a truly ROTFL* moment after reading the above quoted in its original (as quoted by you) form. So truly that I was able to remove cobwebs from underneath the nearby cabinets in the room here.

'half an hour'?!? Be reasonable! And how much accessible room is there in your or anyone's brain? How do you, or they decide what goes in it?


*I'd like to think I'm laughing with you on this one, even if you're not laughing as hard as I just was, which may have been a tad bit more than was warranted.

In any case, I'm glad you agree that not all non-web savvy folks are idiots.

Twey
08-26-2007, 08:18 AM
'half an hour'?!? Be reasonable!I have a friend -- not a genius, just an average guy -- who learnt a working subset of HTML in half an hour. Obviously he didn't then know everything there is to know about HTML, and had to look some of it up as he went along, but he had a decent knowledge.
And how much accessible room is there in your or anyone's brain? How do you, or they decide what goes in it?Who knows? But if they can fit enough knowledge in it to write invalid HTML, I'm sure they can fit enough knowledge to write valid HTML.
*I'd like to think I'm laughing with you on this one, even if you're not laughing as hard as I just was, which may have been a tad bit more than was warranted.Heh, if you enjoyed it who cares? :p
In any case, I'm glad you agree that not all non-web savvy folks are idiots.That would put very large majority of humankind in the "idiot" category. Even my pessimism stretches only so far :) I do believe, however, that most computer users who aren't idiots should be capable of learning a language as simple as HTML, except perhaps in the case of those with specific mental blocks. For these people there isn't much choice but to find someone else to help, like an illiterate writer.

djr33
08-26-2007, 10:30 AM
That would put very large majority of humankind in the "idiot" category.Sad, but true. :(

jscheuer1
08-26-2007, 10:35 AM
I have a friend -- not a genius, just an average guy -- who learnt a working subset of HTML in half an hour.

In that case, I'd take your 'dumb' friends over my smart ones anytime coding was involved.


Sad, but true. :(

Watch it! Flaming is prohibited! :)

connor4312
09-07-2007, 01:14 PM
unfortunatly, no. The code could be totally inactive, but have no coding errors.