Almost valid xhtml
As you may have noticed this site doesn't have any 'valid xhtml' vanity buttons. My previous design used to have these but I decided to rip them out. I've grown to believe there are more important issues to worry about than whether every page on this website is 100% valid xhtml. Allow me to explain!
When you look at the code of this website you'll see that I'm perfectly capable of creating a valid xhtml website with no table to be seen anywhere in the code. In fact at the moment I'm writing this, the site is basically valid except for one thing: some character issues. It's those character issues that drive me nuts lately and I decided to stop bothering with those. In fact most of these issues are generated by my CMS and I really don't see any use in patching this and keeping sure no 'problem' like that will ever occur. Things like this only become 'problems' if we call them that.
Pollution
Then there's the pollution in postings. Even though I do tend to write al my posts in valid XHTML, an error or two may slip through. It's human. Every once in a while one can forget to write an ampersand in a link as & or close a tag. Does it matter? Of course not. These minor problems are forgiven by any modern browser. Nobody will notice except for the ' obsessed'.
There you have it. My main reason for jumping off the 'valid xhtml bandwagon' lies in the mere fact that I can't guarantee perfect validity at all times... that is... I could, but I just don't think the time needed for all this 'quality control' is justified. No one except the occasional geek will ever notice while my pages look fine in any modern browser.
Serving the right content-type
Then there's the content-type issue. We all know xhtml should be served as text/xml and NOT as text/html. Yet, our beloved Internet Explorer 6 can't handle pages served as text/xml. This means we're forced to serve the wrong content type in order to get our site accessible to the majority of visitors. This defeats the whole purpose of xhtml if you think of it. Therefore, if we're already 'doing it wrong' we might as well not bother with minor validation problems anymore. Yet another reason to not show any vanity buttons.
So, go HTML 4.01 then!
Going HTML 4.01 would be an option that eliminates most of the above mentioned problems. However: Writing markup the xhtml way has sort of been carved into my whole way of working. I work a lot with real XML as well. Therefore I write things the XML way. Call me lazy, call me recalcitrant but here's another thing that gives me a feeling of 'why the hell bother?'. It just doesn't matter to anyone except the few obsessed. Going HTML 4.01 would also mean I'd have to dig through all of my postings in order to 'fix' them. Yet another thing I don't feel like spending valuable time on.
Almost valid xhtml
While writing this posting it suddenly got to me. I'm gonna place a button anyway. I'll label it 'almost valid xhtml' and point it to this very posting. As everyone will be able to see from my sourcecode and the sourcecode of any other site / theme I created it's crystal clear I'm fully capable of delivering rock solid standards compliant websites. If you're a customer and you demand valid xhtml I will deliver, that's a promise. I however completely fail to see the relevance of 100% valid xhtml on my personal website. Therefore I'm proudly wearing my new 'almost valid xhtml' link.
Happy webdeveloping!
Filed under: programming
Number of comments:
Number of trackbacks:
Tagged with: 







At 19 January '06 - 09:00 jazzle wrote:
So, a space rocket blew up because of a single typo, but this is 2006 and computers are becoming more human. (By which I mean they can cope with, and more importantly ignore, small errors.)
At 19 January '06 - 09:26 weefselkweekje wrote:
Why give up being an evangelist? Why not change Pivot so it outputs the right characters? Why not let your site be one more reason to get these little things sorted out instead of yielding to them?
The web really needs a presentation language to do it justice. We’ve been meddling with (non-x)html for way too long…
At 19 January '06 - 11:12 Marco wrote:
I’m not ‘giving up being an evangelist’. I am still a web standards advocate. I’m promoting pure CSS based design and modern DOM scripting like any other ‘evangelist’.
The point I was trying to make is the fact that I don’t see much use in tinkering with totally unimportant things such as small character issues. The ‘result’ just isn’t worth the effort. No visitor will ever see the difference and the site won’t ‘break’ in any browser if there’s one or two ‘wrong’ characters in it. I could spend this energy better on improving the site, writing articles and doing other things nice to the site. I’m quite sure my readers will appreciate that a lot more than a 100% clean xhtml source.
At 19 January '06 - 11:41 bosmeneer wrote:
And I think
thislog is valid when you change the ‘triple dot’-char (in the commentary-tab) to the Ascii-code 8230 (At 19 January '06 - 12:32 Eljo (Morpurgo.nl) wrote:
At 20 January '06 - 03:04 Ray mosley wrote:
At 20 January '06 - 04:14 Khevor wrote:
At 20 January '06 - 04:56 Marco wrote:
The advantages of pure CSS design are numerous. Less code, better SEO, better accessibility, the list goes on and on…
But then again, the saying ‘whatever works for you’ goes as well of course. If your site was made just for a couple of friends and they can all properly view it I guess you’ve already reached your objective and you shouldn’t bother indeed.
At 20 January '06 - 05:57 Andy wrote:
At 20 January '06 - 06:10 Marco wrote:
The CSS throws some errors due to an Internet Explorer proprietary thing I used and due to the cursor:hand thing. Both of these don’t cause ANY problems in ANY browser which is why I find them perfectly acceptable. Then there’s the CSS warnings telling me I have duplicate definitions for background colors etc. I could eliminate all those but for what? Tell me what use that has. The CSS is valid apart from the above mentioned ‘errors’.
Anyway, all this is the kind of stuff I stopped caring about. Anyone can see from my sourcecode that this site hasn’t been built by some braindead amateur which is all that counts when it comes to the few that look at the source in the first place.
At 20 January '06 - 06:40 Veracon wrote:
At 20 January '06 - 06:59 Marco wrote:
At 20 January '06 - 07:36 Ronald wrote:
At 20 January '06 - 07:42 Marco wrote:
However, all this is still not the true point of this article. It’s about whether it’s useful or not to keep track of any tiny little problem that may or may not occur over the months / years while running a weblog. It’s not about the importance of delivering a clean product when you launch it. On that issue I fully agree tidiness is important, if only for maintainability reasons.
At 20 January '06 - 16:13 Volkher Hofmann wrote:
I tend to agree with you. I always have problems with those pesky Amazon associate links and the ampersands. I’ve stopped bothering and the next redesign will see the disappearance of the “valid XHTML” button as well.
It’s good enough to know that I’ve tried my best and will try to improve on it with my next design.
There are more important things to lose sleep over.
Keep up the great work here!
Cheers!
At 21 January '06 - 13:48 Christian Montoya wrote:
XHTML should be served as application/xhtml xml.
text/xml is optional, and not what you meant.
If you served your weblog as application/xhtml xml, it would not display. If you served it with an html 4.01 doctype, you seriously would not have to change anything, because self closed tags with spaces are exactly the error in html tag soup parsing that allows us to serve xhtml as text/html. I’m pretty sure I told you all this already through some discussion list, and I never did get your response on any of it.
At 21 January '06 - 17:32 Andrew wrote:
Your redesign looks pretty good! (...Except for some strange Google ad flickering in FF when I hover over links in the right column.)
At 22 January '06 - 07:30 Hong Hui wrote:
I got confused for a while and thought that those links, with the same typos and font size, was linking to pages within this site.
And how come the url to this entry is at the last of the navigation panel? :)
At 22 January '06 - 07:59 Marco wrote:
As for that other remark: I’m not sure what you mean?
Thanks!
At 22 January '06 - 17:03 Koray wrote:
When Idiots join forces.
At 22 January '06 - 17:06 Thame wrote:
At 22 January '06 - 18:43 David wrote:
there i have thus invalidated his site even more ;)
edit—well it seems i was tring to be a smart ass put intentional ampersands in to make a poitn but the comment did not let me d it. as you can see it blocked out half of my prevoius post. well there goes the neighborhood
At 22 January '06 - 21:49 Creative Common License wrote:
* to copy, distribute, display, and perform the work
* to make derivative works
HYPOCRITE!!!!
At 22 January '06 - 21:57 Hong Hui wrote:
Allow me to rephrase myself. :)
Let me guess, the last link entitled “Almost valid xhtml” is actually to inform ppl, like many blogs on the net with those cute little “valid “ buttons, that the site has conformed to certained standard but in ya site context, it is not yet valid. Kekeke…:)
If that is the case, then may i suggest, in my previous post that you apply another set of styling to allow users to know that these links are not part of the navigation panel but just some notes of sort. :)
At 23 January '06 - 14:06 Christian Montoya wrote:
Marco: still waiting for a response.
Anyway, this is something I’ll be writing about in the near future… a return to HTML 4, a call for completely valid CMS’s and better information from the standards community. For the time being, I have to mention that Wordpress plus a text editor such as Markdown or Textile is very effective at ensuring that the markup does not break validation, though if you are already using some other platform there isn’t much you can do.
At 23 January '06 - 14:46 Marco wrote:
At 23 January '06 - 16:30 Christian Montoya wrote:
I guess the implied question is, why don’t you use an html 4 doctype?
At 23 January '06 - 16:31 Christian Montoya wrote:
At 23 January '06 - 22:45 Marco wrote:
When overriding the doctype and setting it to 4.01 strict you’ll get a lot more stupid errors than with the current doctype (which only throws two wrong characters).
At 24 January '06 - 01:06 David B. wrote:
At 24 January '06 - 01:48 maxzilla wrote:
At 24 January '06 - 13:24 Marco wrote:
I did notice that the script.aculo.us SlideDown effect crashes IE when I use it in my tabs in the right section. This is how I ended up replacing it with fades. I liked sliding better but IE dies like a squashes bug every time something finishes sliding down.
At 24 January '06 - 19:44 david wrote:
At 25 January '06 - 09:05 Tobias wrote:
At 25 January '06 - 09:06 Tobias wrote:
At 25 January '06 - 09:07 Tobias wrote:
At 21 February '06 - 15:01 Jero wrote:
However, I do support using valid markup, but not in a way as most other would. As I wrote on my website in one of my articles, valid markup has no meaning. I could write a page heavily abusing tables and divs and still be able to put those ugly “Valid whatever” buttons on my website, but it’s the quality of the markup (mostly called semantical markup) that matters to me.
At 22 February '06 - 12:21 Christian Montoya wrote:
At 28 February '06 - 18:45 h3 wrote:
At 24 October '06 - 13:25 The Faeriekeeper wrote:
Yet in some small way hopefully an extra effort now and then will encourage others to see that the beauty and promise of the world wide web is really not for ourselves and our own vanity, rather for those who rely on the web, our disABLED.
At 25 October '06 - 14:24 h3 wrote:
In fact, things are even worst.. XHTML is planned for IE8.
Don’t hold your breath :|
At 12 November '06 - 09:41 Bhavik Vora wrote:
nyways even the most reputed sites..
google and microsoft.com arent even CSS valid !!!!
At 15 December '06 - 02:22 Joe Volpe >> testing services wrote:
At 20 December '06 - 01:31 Scott Brison - weight loss support wrote:
At 25 December '06 - 05:49 Gerard Kennedy => Employee management wrote:
At 20 February '07 - 09:30 David Bannon wrote:
by scanning the http ACCEPT header, you can find if application/xhtml xml is allowed and if its q rating is higher than text/html. You can then output the header content-type.
Also you could simply run the finished page through an output buffer to replace “ />” with “>”.
Exactly what I do on my site!
At 26 January '08 - 19:55 Sean wrote:
Not only is filtering a great way to abide by certain rules (w3), it’s a great way to make sure your site is rendered in all browsers the same way, and to keep text as text.
At 27 January '08 - 05:15 Marco wrote:
At 27 January '08 - 05:42 David Bannon wrote:
At 24 March '08 - 07:37 Briongloid wrote:
I agree though, that this is not always possible.
The whole thing gets thrown out the window anyway if you want to add any third party code, such as a Google Map or a Paypal button.
I have, in the past, gone through the code and changed
At 21 November '08 - 10:55 Marc K wrote:
Well, I’ve just viewed the source of this page and it made me smile when I saw the scrap of Google AdWords code inlined but not escaped with CDATA[...] — all this fussing around frustrates me too. I often think of modifying the XHTML Strict DTD very slightly just to allow what I perceive to be perfectly rational things like and elements automatically being set to CDATA inside by default (why not? I don’t want the same parsing engine dealing with it, damnit, only the CSS or JS one. Seems like an obvious oversight, unless there’s something I’m missing.)
To touch upon another debate: I think the same applies to XML character entity escaping for URLs in attributes. Why is this necessary at all? That bloody default PCDATA declaration again… Seems to me like the very quoting of the attribute value itself should instruct the browser (sorry, user-agent) to hold it back from the XML parser and let the guts of the application handle the URL, which is invisible in the document anyway (unless it’s actually placed as node inside the Anchor element, perhaps
At 21 November '08 - 10:57 Marc K wrote:
At 02 July '09 - 04:43 Manuel Graf wrote:
At 28 October '09 - 18:51 Jessica Brown wrote: