Recycle your HTML-fu
Recycling is good.
If you look around right now, you have high chances of being the oldest piece of furniture in the room. Maybe it's time to consider some recycling, and this post is trying to help by telling things you may already know - or maybe not.
- Little did you know, <META name="keywords"> is being ignored by Google and others. Google has confirmed that they do not trust this information.
- On your way out of ie6, you may consider using Dean Edwards' ie7.js. It's an excellent library that provides transparent PNGs, advanced CSS selectors like first-child and last-child, multiple CSS classes... It also includes some missing features for ie7.
- I already mentioned this a couple of times: you are not using XHTML. It's nice to use well-formed HTML pages, but don't take it too seriously.
- When using script tags, you may omit the language and type attributes.
- All HTML validators will complain if you try to follow any of these practices, but it is time they get properly updated. For example, according to the standard a label with a nested input field does not need to provide a "for" attribute, which is something that validators tend to forget.
- Closely related to the previous point, the only up-to-date (beta) HTML validators I know of are validator.nu and the W3C HTML 5 validator.
- When developing your next REST web portal, keep in mind that GET links must be idempotent, which is a cool way to say that they should not modify anything in the database. For anything else, consider using POST links or forms.
- Speaking of which, POST is the only safe way to prevent web crawlers from visiting links. Do not use rel="nofollow" for this purpose.
These are random thoughts that were raised to the table in our last web training week in Zurich. As the funny note of the week, I took a break to buy a t-shirt for my sister, who is obtaining her Ph.D. with the very same CERN guys that are working on the Large Hadron Collider.
Talk about twisted sense of humor :)