This month, Marcus Alexander of EMC Consulting and Arran Ross-Paterson (of this parish) talk about HTML in the real world, dealing with clients, and what a quality project actually looks like.
These are my notes on Arran’s talk:
LWSWorld - Why Validate - Arran Ross-Paterson
Greeted by boos from the crowd, Arran’s controversial talk focused on why we shouldn’t worry that our web sites don’t validate in the W3C checker.
Validation
Browsers don’t care, nor does Google. Unless it’s a requirement, just use it as a sanity checker. Your code doesn’t always have to validate to be valid.
Alt tags
Alt tags never fully describe a picture. There’s no point in having an alt tag on an image if it’s not completely descriptive. If the image is just to attract attention, then don’t worry. If it’s an image map, you will need to add some more description.
Calendars
Calendars look like tables, but they could be a list, and surely it’s ordered, but if you’re doing an event calendar, a definition list is the most semantic markup, except that <dl>s are really hard to style and missing tags can cause problems. Having <dd> inside a <dt> isn’t correct according to the validator, but feels more correct semantically.
Don’t abandon standards
Standards are very useful, so don’t abandon them. They’re great for learning and teaching people, to bring them up to a certain level, but as long as it works, don’t sweat it.
In the early days of the Internet, web sites were for gathering and displaying information. In its 20 year history, this hasn’t changed much! At some point on a site you have to enter your details or what information you’re searching for. So, it makes sense that the thing I spend most of my time doing is creating forms!
Most of the time you see a form, the label is on the left and the field is on the right, with validation or help after the input field. There are lots of ways this can be laid out, but the simplest and most semantically correct method is hardly ever used. What I’m going to show you is how to lay out a form properly with standards-compliant CSS.