Tags: xhtml

22

sparkline

Monday, February 3rd, 2020

Old CSS, new CSS / fuzzy notepad

I absolutely love this in-depth history of the web, written in a snappy, snarky tone.

In the beginning, there was no CSS.

This was very bad.

Even if you—like me—lived through all this stuff, I guarantee there’ll still be something in here you didn’t know.

Thursday, July 18th, 2019

Ralph Lavelle: On resilience

Thoughts on frameworks, prompted by a re-reading of Resilient Web Design. I quite like the book being described as a “a bird’s-eye view of the whole web design circus.”

Thursday, November 13th, 2014

You’re So Smart You Turned JavaScript into XHTML

Web developers overwhelmingly rejected the draconian error-handing of XML …and yet today, web developers are embracing that very same error-handling model by rendering everything with JavaScript.

I don’t think it’s the way of the web to have your site fail and show a blank screen because some third-party dependency doesn’t load, JavaScript is turned off or because your developer left a trailing comma in a JavaScript object and didn’t test in Internet Explorer.

Sunday, July 24th, 2011

Google

A fascinating examination by Hixie of web technologies that may have technically been “better” than HTML, but still found themselves subsumed into the simpler, more straightforward, good ol’ hypertext markup language.

The follow-on comments are definitely worth a read too.

Wednesday, April 21st, 2010

HTML/XHTML Compatibility Authoring Guidelines

A first bash at describing how to write (X)HTML5 documents that can be parsed as XML as well as HTML.

Wednesday, July 29th, 2009

Misunderstanding Markup: XHTML 2/HTML 5 Comic Strip | How-To | Smashing Magazine

My words have been given new life in comic form thanks to the very talented Brad Colbow.

Wednesday, July 8th, 2009

Thoughts on the whole XHTML/HTML5 affair | Morethanseven

I think Gareth is reading my mind. Get out my mind, Gareth!

Tuesday, July 7th, 2009

Misunderstanding markup

The W3C announced last week that the XHTML 2 Working Group will wrap up at the end of this year. This should have been a straightforward, welcome announcement. Instead it has confused a lot of people who believe that it heralds the end of XHTML—see, for example, the comments on Zeldman’s blog post.

This confusion is understandable given the lamentable names that have been assigned to different technologies. This isn’t the first time this has happened…

sounds like it has something to do with Java. It doesn’t. Apart from some superficial syntactical similarities, they have nothing in common. Java is to JavaScript as ham is to hamster.

sounds like it has something to do with HTML. It doesn’t. DHTML is a catch-all term to describe the action of updating the CSS properties of HTML elements using JavaScript. I have my own catch-all term for the combination of HTML, CSS, and JavaScript; I call it web development.

And so to . You’d be forgiven for thinking it has something to do with or . It doesn’t.

XHTML 1.0 is simply a reformulation of HTML 4 with XML syntax:

  • lowercase tag and attribute names,
  • quoted attribute values,
  • mandatory closing tags for p and li elements,
  • a slash at the end of standalone elements like img, br, and meta.

XHTML 1.1 is the same reformulation but with the added unrealistic demand that documents must served with an XML mime-type.

XHTML 2, by contrast, has had very, very little in common with HTML 4. It was an attempt at a fresh start, to create a theoretically “pure” vocabulary with little concern for backwards compatibility. It was, of course, doomed to failure:

This was a philosophically pure specification that was so backwardly incompatible that it nearly deprecated the img element.

Now that XHTML 2 is dead, some people think that this means XHTML is dead. It doesn’t.

Henri Sivonen apparently attempts to clear up this confusion by writing An Unofficial Q and A about the Discontinuation of the XHTML2 WG which, alas, is not very clearly written. Also, Henri, as pointed out by John Allsopp, your snark is showing:

There are two meanings to XHTML: technical and marketing. The technical kind (XHTML served using the application/xhtml+xml MIME type) is a formulation of HTML as an XML vocabulary. The marketing kind (XHTML served using the text/html MIME type) is processed just like HTML by browsers but the authors attempt to observe slightly different syntax rules in order to make it seem that they are doing something newer and shinier compared to HTML.

Belittling authors who prefer a stricter syntax is no way to explain technical differences between formats.

There are perfectly good reasons for choosing to use the XHTML syntax. Take, for example, Drew’s comment:

Whenever this argument surfaces, there seems to be the assumption that loose syntax is easier for beginners. This baffles me. In my experience simple, strict rules are much easier to learn and code to than loose rules with multiple shortcuts. I like XHTML because attributes must always be quoted. Tags must always be closed. These are simple rules that require no thought, and result in uniform, predictable markup.

I’m not saying that XHTML syntax is better or worse than HTML syntax. I’m saying it’s a personal choice. If you prefer a different syntax to me, that doesn’t mean that one of us is wrong. If I like Thai food and you prefer Italian, neither of us is wrong.

The death of XHTML 2 does not mean the death of XHTML syntax. If you want to continue to close all tags and quote all attributes, you can do so. You can either use the existing XHTML 1 spec or you can use HTML 5.

That’s right; HTML 5 allows you to use whichever syntax you are most comfortable with. Doctor Bruce has the diagnosis:

I like the XHTML syntax. It’s how I learned. I’m used to lowercase code, quoted attributes and trailing slashes on elements like br and img. They make me feel nice and comfy, like a cup of Ovaltine and The Evil Dead on the telly.

But you might not. You might want SHOUTY UPPERCASE tags, no trailing slashes and attribute minimisation. And, in HTML 5 you can choose.

Thanks to the “pave the cowpaths” principle, it’s up to you. As you like it. What you will. Whatever you want, whatever you like.

If you want, you can even serve your documents as application/xhtml+xml, instantly transforming them from HTML 5 into XHTML 5 …yes, another confusing name.

Just remember, XHTML 2, the spec, has nothing to do with XHTML, the syntax. XHTML lives on in HTML 5.

But, but, but…, I hear you cry, surely that does us no good because HTML 5 isn’t supported yet, right?

Define support. HTML 5, unlike XHTML 2, is designed to be backwards compatible. So here’s how you can take an existing XHTML 1 document and convert it to HTML 5…

Take this line:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Replace it with:

<!DOCTYPE html>

Done.

XHTML 2 is dead. Long live XHTML …as HTML 5.

Update: What Zeldman said.

Thursday, July 2nd, 2009

Archive of W3C News in 2009

It looks like XHTML2 is going to get mothballed at the end of this year.

The Future of Code

Steven Pemberton, one of my favourite long-term thinkers, talks about programming, markup and XForms.

Friday, October 10th, 2008

Validifier: Turn Flash embed code into valid XHTML

A handy little tool to turn video embedding markup into valid XHTML.

Wednesday, June 4th, 2008

Eric's Archived Thoughts: The Missing Link

An excellent passionate call to action by Eric explaining why the href attribute should be freed from the shackles of the anchor element.

Thursday, May 15th, 2008

Google Doctype - Google Code

This looks like it could be a very valuable resource indeed: a user-contributed and edited reference for HTML, CSS and JavaScript.

Tuesday, October 16th, 2007

Validator S.A.C. - Stand-Alone W3C HTML Validator Application for Mac OS X

For those times when you need to validate your markup but you don't have a 'net connection.

Wednesday, August 15th, 2007

Jeffrey Zeldman Presents : What crisis?

I was feeling very browbeaten after Molly's tirade but count on Jeffrey to put things in perspective.

Wednesday, January 25th, 2006

Google Code: Web Authoring Statistics

Useful markup statistics from Google, complete with snotty commentary.

Monday, December 19th, 2005

Eric's Archived Thoughts: Adium: Chatting With Style

You can skin Adium using just XHTML and CSS. Who knew?

Monday, November 14th, 2005

Valid downlevel-revealed conditional comments | 456 Berea Street

Keep this one handy in case you have to use conditional comments to hide something from Internet Explorer.

Sunday, September 25th, 2005

Liquid Designs

This is something I always meant to do but never got around to: a gallery site for good liquid design.

Sunday, May 15th, 2005

hReview

There's a new microformat on the block.