A random collection of things I've learnt while playing with HTML 5, mostly from errors thrown by the HTML 5 validator trying to validate this blog. There is absolutely nothing groundbreaking here, and it's stuff I should have already known (or more likely and frightening not forgotten that I did know). In fact, most of it has nothing to do with HTML 5 at all.
- If you have valid HTML 4 and you change the DOCTYPE declaration to <!DOCTYPE html> things will mostly just work and your page will be valid HTML 5.
- — is an invalid character, not an em dash, and shouldn't be used. Use — instead. See the article on A List Apart about dashes. Of course, this has nothing to do with HTML 5.
- When the href of an anchor has a query string that contains an ampersand, the ampersand should be escaped. So http://example.com?id=1&colour=red should be http://example.com?id=1&colour=red. Again, that's not about HTML 5. This is actually my most common error, and I can't seem to fix it. Changing to an entity still ends with a raw ampersand in source. I'll have to investigate sometime.
- The
ttelement is obsolete. - I use a lot of em dashes.
- Spaces in hrefs work but are not valid.
- Habari's autop function looks like it could still do with some work.
- I can sleep under my desk and no-one will notice.