Search This Blog

Saturday, 7 November 2009

More lessons in XHTML

So, following on from my last blog, I've now done the research I mentioned, and found out that the way to deal with ampersands in URLs is to write them as XML entities, i.e. '&', which is slightly embarrassing, as that should have occurred to me given that I've been using XML for nearly a decade.

And the XHTML-approved way of making a hyperlink open a new window is to replace the 'target' attribute with an 'onclick' attribute which calls the relevant JavaScript function to do it.

Something else I've just learned, having just previewed this blog, is that typing '&' out in full is more than a bit dumb, as the browser, of course, renders it as '&'; time for a sneaky trick to fool the browser. One last question: how can a modern browser possibly not know that 'blog' is a proper word?