Web standards: practice what you preach?

This post about web standards struck a chord wih me. Because I promote TopStyle as a tool for building standards-compliant sites, I frequently get email reporting that my own site doesn’t validate.

However, the reason it doesn’t validate is quite simple. My site uses Atomz search, and Atomz offers proprietary elements which control how a site is indexed. For example, Atomz won’t index anything wrapped in <noindex>..</noindex>. I use noindex elements on every page to skip indexing the navigation links, which causes the W3C’s validator to complain that my site isn’t valid XHTML. This inevitably leads to email from people calling me a hypocrite.

Now, I’m all for web standards. I’ve been creating sites since 1995, and I’ve learned the hard way how writing browser-specific code leads to problems down the road. However, I consider standards-compliance a goal, not a requirement. Limiting the usefulness of my site’s search feature just to make it 100% valid XHTML seems way over the top. Standards-compliance isn’t an uncomprising religion, but rather a practical business decision that must be weighed alongside the other goals of your site.

15 thoughts on “Web standards: practice what you preach?

  1. Taken out from one of your links:
    15: “have to use table instead of CSS positioning or else Netscape4 completely screws it up ”
    Netscape 4?, c’mon Nick, why are you still coding for such prehistoric browsers?¿ …. One thing is try to coding for a vaste audience (Mozilla, Opera, NS6/7, IE5/6, Konkeror, etc) and another one is to waste your time with a 5+ years browser (it was released for Windows 3.1!!! **yeeks**). Just my 2 cents.

  2. I agree totally. Many people seem to think that developing for standards-compliance is an end in itself, and lose site of why or what they are gaining by standards-compliance.

  3. Too bad fot Atomz. Other search engines let you configure tags marking non-indexing areas.
    They could at least use something like

  4. I have to agree with you totally. It just does not make sense spending a disproportionate amount of time and energy struggling to get the last tenth of a percent to reach total conformity. The road to perfection is a long and winding one and in order to make it work out one needs to exercise some restraint and an open mind.

  5. Real World Standards

    Recent Andy Budd posts [1|2] have prompted various posts about standards implementation with lessons for us all. Nick Bradbury in response to this post by Paul Scrivens about web standards had this to say I consider standards-compliance a goal, not…

  6. I think this is definately an Atomz issue. Changing <noindex></noindex> to &ltdiv class=”noindex”></div> should not be much of a problem for their engine. I would ask them to do it, because the reasons for this are obvious.
    PS. Removing all tags from the posts completely seems to be and odd design decision from Six Apart. I wonder why they are not just encoding all < and > to &lt; and &gt;? This would make it much easier to post html code in the comments.

  7. Surely the solution is to provide a namespace declaration for the noindex element and then your document becomes well formed XML which should validate. You’ve done it for the RDF elements.

  8. We could use a validation service that will ignore (or merely warn about) the well-formed use of elements and attributes from other namespaces than html:http://www.w3.org/1999/xhtml.
    After all – standard behaviour for HTML browsers is to ignore unknown tags and attributes. (But I think we should insist on well-formedness)

  9. I agree with SC. This is the same issue as valid XHTML Strict + target attribute issues.
    No one said that XHTML CAN’T include other things, just that those things need to either be in their own proper namespace or in a custom DTD. Broken is broken in this case when there are two other options available; assuming that Atomz would grok the namespace or DTD.
    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd“ [
    <!ATTLIST a target CDATA #IMPLIED>]>
    I’m no DTD guru, so apply that concept to adding noindex instead.

  10. ScottJ: I use Atomz for my entire site, not just the blog. Feedster could handle my blog, but not the rest of my site (or am I mistaken about that?).

  11. I use Atomz Search on several of my sites. To avoid validation errors on <noindex></noindex>, my PHP scripts emit those tags only when the user agent is “Atomz…”
    But that doesn’t solve the problem completely: When Atomz returns accented characters in the search results, it turns my carefully-crafted character entities into single byte characters that are not valid UTF-8. So the search results page itself won’t validate, even with <noindex></noindex> suppressed.
    I can understand that Atomz needs to do interpret my character entities, so it can find Ñ when someone searches for “N,” for example, but the search results should include the unmolested entities.

Comments are closed.