Slashdot Mirror


Do You Care if Your Website is W3C Compliant?

eldavojohn wonders: " Do W3C standards hold any importance to anyone and if so, why? When you finish a website, do you run it to the validator to laugh and take bets, or do you e-mail the results to the office intern and tell him/her to get to work? Since Opera 9 is the only browser to pass the ACID2 test, is strict compliance really necessary?" We all know that standards are important, but there has always been a distance between what is put forth by the W3C and what we get from our browsers. Microsoft has yet to release a browser that comes close to supporting standards (and it remains to be seen if IE7 will change this). Mozilla, although supportive, is still a ways from ACID2 compliance. Web developers are therefore faced with a difficult decision: do they develop their content to the standards, or to the browsers that will render it? As web developers (or the manager of web developers), what decisions did you made on your projects? Update: 05/20 by C : rgmisra provides a minor correction to the information provided. It is stated above that Opera9 is the only browser to pass the ACID2 test, however "This is not true - Safari was the first released publicly released browser to pass the ACID2 tests." -- Sorry about the mistake.

16 of 624 comments (clear)

  1. Depends on Usage by foundme · · Score: 5, Insightful

    For commercial sites, it's all about ROI. So your PHB is unlikely to approve any spending unless you can prove significant loss of sales as a result of non-compliance.

    On the other hand, if I'm building a site in my spare time, and it's targetted at Slashdot audience, I would be very careful with all the standards because (1) I can approve my own time and (2) I am more concerned about peers' feedback than ROI.

    I guess it's the humanization of the site that makes you care about compliance.

    --
    Please stop entering code 2,2,7,6,6,4
  2. Safari 2 by m0rph3us0 · · Score: 5, Informative

    IIRC, Opera 9 is not the only compliant browser. I believe Safari 2 is also compliant.

    1. Re:Safari 2 by chasingporsches · · Score: 5, Informative

      you do remember correctly. actually, safari passed it long before opera did.

  3. Because it's a good idea by GigsVT · · Score: 5, Insightful

    I validate every page.

    When you write a program, your compiler or interperter will tell you when you fuck up. When you write a website, your browser tries its best not to tell you when a page is fucked up.

    It's a supremely bad idea to rely on whether a browser can display your site to determine whether it is designed correctly or not. Even the next version of the same browser might do something unpredictably different with your tag soup.

    --
    I've had enough abrasive sigs. Kittens are cute and fuzzy.
  4. I care by Anonymous Coward · · Score: 5, Insightful

    Because the W3C validator doubles as a good error-checker. If the W3C validator rejects my page, then chances are I will have display problems of some sort on some browser I haven't tested yet.

    Unfortunately the contrapositive is not true, if the W3C validator accepts my page then there is no guarantee I will avoid display problems. But it's a good first step.

  5. do i care? by bitkari · · Score: 5, Funny

    nope.

  6. Reasons to validate by JimDabell · · Score: 5, Informative

    Reposted from something I wrote a while ago

    You cannot prove anything about the future... but you can identify trends.

    Before Netscape 1.2 came out, it was a common, non-standard hack to use multiple title and body elements to get crude animation. Netscape 1.2 came out, and screwed these pages up. Following standards ensured forwards compatibility with Netscape 1.2.

    Before Netscape 2.0 came out, missing quotes on the end of an attribute were detected as errors by Netscape 1.x and compensated for. Netscape 2.0 came out; it did not. Large sections of pages disappeared. Following standards ensured forwards compatibility with Netscape 2.0.

    Before Netscape 3.0 came out, people were careless with their ampersands, failing to correctly encode them in URLs, for example. These were detected as errors by the current browsers, and compensated for. Netscape 3.0 came out; it did not. Lots of broken links everywhere. Following standards ensured forwards compatibility with Netscape 3.0.

    Before Netscape 4.0 came out, people were still careless with character entities, omitting the trailing semicolon (I believe this was a property of many graphical editors, such as Frontpage). This was detected by the current browsers, and compensated for. Netscape 4.0 came out; it did not. Following standards ensured forwards compatibility with Netscape 4.0.

    Before Netscape 6.0 came out, people used a variety of non-standard Javascript techniques and layer elements, detecting Internet Explorer, and serving them alternative code. Netscape 6.0 came out, it didn't support the proprietary Netscape-isms of previous releases. Following standards ensured forwards compatibility with Netscape 6.0.

    More recent problems include stylesheets served with an incorrect content-type header, and table-layout images being broken up with lots of little gaps.

    This list only includes Netscape behaviour, as that is the only list I have to hand. (Thanks to this article). I'm sure similar things apply to other browsers.

    There is plenty of evidence that sticking with standard code results in forwards compatibility.

    There are really only two important properties of future browsers:

    • They are likely to support at least as much of the specifications as the current version
    • Nobody can test in them

    Thus, my overwhelming desire is to simply treat future browsers as I would any other browser I couldn't test in: code to standards, and when I get a chance to test, fix up what is necessary.

    There are very few good reasons these days to write invalid code. Mostly it's just ignorance and apathy that causes people to write invalid code.

  7. Re:Acid2 is NOT A "Complaince" Test by Bogtha · · Score: 5, Informative

    If you bother to read the Acid2 page, you'll see that its purpose is to see how a browser renders INCORRECT code.

    Have you actually bothered to read the Acid2 page? Because I hear this repeated all the time, and it's downright misleading.

    There is a checklist of about a dozen things the Acid2 page tests. Incorrect code is just one of them. It is necessary to include incorrect code in a test like this. How else are you going to check whether a browser follows the CSS error handling rules?

    It's incorrect code, sure, but it's incorrect code that has a defined rendering according to the CSS specifications. It's not something a compliant browser would trip up on. There is a correct way to parse the incorrect code, and the Acid2 page tests to see if a browser parses it correctly - among many other things it tests for.

    Where are you guys getting this idea that the Acid2 test is all about error handling? It's a very small part of the test, but plenty of Slashdotters seem convinced that the test revolves around broken code and nothing else. Was there a weekly meeting I missed wher eyou all got this myth drilled into your heads?

    --
    Bogtha Bogtha Bogtha
  8. Re:Oh, Irony... by kebes · · Score: 5, Insightful

    More specifically, if you run the article page through the validator it fails with 60 errors. The truth is that the vast majority of pages out there will fail. It's a catch-22: as long as browsers are not compliant, web-pages won't be compliant... and as long as web-pages are not compliant, what's the point in standards-compliant browsers?

  9. Re:table vs. div by Bogtha · · Score: 5, Informative

    Do the replacement of tables with div-elements really help anybody

    You're asking the wrong question. It's not about replacing <table> elements with <div> elements. It's about using the most appropriate element type and leaving the presentation up to CSS. Sometimes that means using a <table> element, sometimes that means using a <div> element, and sometimes it means using something completely different, like <ul>.

    If you need to do a three-column layout it will be much easier and give cleaner code to just use a table

    The thing is, it's not easier or cleaner. In fact, it's usually the opposite. With CSS, you develop the layout code once, and apply it to all the pages on your site simultaneously. With tables, you have to hack up stupid <tr>s and <td>s for each and every page you do. Mindless, boring, repetitive work.

    I also feel that it would be semanticly much cleaner to have a table with one row and three cells than to have three or four divs nested and floated in strange ways.

    This sentence makes no sense. Semantics describe what individual parts of the page mean and are encoded with HTML elements. They have nothing to do with the layout or CSS. Why would "floating something in a strange way" be semantically wrong? Floating things happens on a completely different conceptual level to the semantics. On the other hand, describing something as a table, when it's really a heading or an image, is obviously semantically wrong.

    --
    Bogtha Bogtha Bogtha
  10. Re:A relevant quote by globalar · · Score: 5, Informative

    Aside from the all-important issue of "does it look right?", there is the professional issue of what sort of standards you should apply to your work. It's difficult to come close to a more extensive (and yet simple to implement) baseline metric of quality control with HTML/CSS than the W3C parser. Sure, I could go through and decide how I am going to do everything, but that's time-intensive and inflexible. Running something through the parser gives me a fast and consistent report. I can do whatever I want with the results, but they are there.

    It does not solve problems for you or guarantee much of anything, but it allows you to see your formatting code in a more objective way. As a bonus, it can help you spot potential problems, mistakes, and open your eyes to some of the structure you are relying upon.

    I always use the Tidy Firefox extension. It is a little friendlier than the online W3C parser interface. Disclaimer: not a professional web designer.

  11. Only if... by GWBasic · · Score: 5, Interesting
    Only if it doesn't compile.

    On a more serious note, the only way to solve the problem is to have browsers shame non-complient pages. Specifically, if IE7 displayed a dialog that said, "This web site is constructed improperly and might not work as expected" every time it hit an invalid page, things would change VERY FAST.

  12. Re:Opera 9 and Safari 2 are both beta by allgood2 · · Score: 5, Informative

    The latest version of Safari is Safari 2.0.3. It's not in beta, and has been available to users since Mac OS X Tiger was released. It's not available for download from the Apple site, for the same reason many other Apple applications aren't available for download--current applications come as part of the operating system, and are automatically updated via Apple's Software Update. If a user needs to reinstall, they are suppose to go back to the OS disk.

    I should also mention that if you perform a search for Safari on the Apple Support website, you will also get a link to Safari 1.3.2 and Safari 2.0.1 both newer versions than the one you pointed to, which is legacy software.

  13. when i *finish*? by croddy · · Score: 5, Insightful
    When you finish a website, do you run it to the validator to laugh and take bets, or do you e-mail the results to the office intern and tell him/her to get to work?

    no, when i *start* a website, i'm running it through the validator. producing valid html and css isn't some kind of bonus afterthought. it's something you do from line 1.

  14. Re:And besides... by Myen · · Score: 5, Informative

    Please, please *don't* write HTML as if it's XHTML. Self-closing tags in HTML is totally invalid and screws up the parsers. Pretend you're a HTML (not XML) parser and parse:

    <html><body><script src="..."/>Lots of stuff</body></html>

    Your <script> tag never gets closed (remember, this is *not* XML!). Wee, no content....

    If you are actually sending it with some sort of XML MIME type, yes, go ahead and do self-closing tags. Just don't pretend it works when you're being HTML.

  15. I disagree; it does not depend on usage by hobo+sapiens · · Score: 5, Insightful
    For commercial sites, it's all about ROI
    Aaargh! You imply that developing a website using web standards takes longer. False! It _does_ require that you exercise more care. Do it for more than one website and it'll become second nature, meaning things like using closing tags on everything, quoting attributes, and properly nesting tags.

    I have developed sites both using tag soup AND strict HTML and XHTML. It takes no longer to do things the standards way, and using standards will almost ALWAYS make maintenance easier and therefore faster. That's ROI.

    Finally, I use Firefox's tidy validator. It takes no time to validate your code (literally, it gives you a status bar icon indicating success or failure) and I have found that more often that not, checking for validation errors helps you find logical errors in your scripting code (e.g. incorrect criteria with a loop over a recordset).

    It pays to use standards. I speak from experience. That doesn't mean that you have to slavishly adhere to them in certain situations. 99% of the time, though, there is no real excuse to ignore them.
    --
    blah blah blah