I'm getting really close to being 100% complete with my new (old) site, maurymccown.com, and I've been enjoying building everything to Standards. (If you follow the above link, be aware you may see radical changes here and there as I tweak the back end.)
I use ExpressionEngine as my content management software, and the latest releases default to XHTML 1.0 Strict, so that's what I've been coding toward. With the onset of more and more people using handheld devices for full web browsing (and loads of other reasons), getting one's site to adhere to Strict standards is a good move to make. This, however, required me to change some of my old ways — and I'm still getting used to those changes. Namely...
The "target" attribute is fully deprecated.
I always — always — used "target="_blank"" when adding links, mainly because I never wanted a reader to navigate away from my site and never return. No can do with XHTML 1.0 Strict. The reason is simple: opening a link in a new window assumes the device reading the site has a windowed interface — and that can't be guaranteed, so there's no reason to include it as a standard. Furthermore, my forcing a link to open a new window overrides the user's desire — if a user really wants a new window, they can open the link via contextual menu.
Border specifications are deprecated.
Since I'm an old dog hand coder, it's become second nature to include "border=0" around all my images, but that's no longer valid. To get around this, you simply specify a CSS class for your img tags, saying "border-style: none." Done deal.
Going back to H1, H2, etc.
Since I began migrating to CSS back in 2002, I started ignoring the long-standing heading tags like H1, H2, H3, etc. For my headings, I'd just create a style in CSS and apply it — but it really is better to use heading tags. First off, it helps those with disabilities read your site, because those specific heading tags are looked for when a page is read. Also, most indexing spiders look for content in your heading tags, so that can help with page ranking in search engines. Lastly, it's just good form to use them, so that's what I'm doing.
The death of tables as a crutch.
I'm also having to get over the ease of using tables for navigation bars and the like. Tables are meant for tabular data, and a lot of us old hats use the for all kinds of non-tabular stuff — but CSS can do anything a table can. Instead of specifying cell size to make all your button equidistant, just wrap them is a CSS style. A lot of the alignment attributes aren't allowed in tables any longer, either, so that puts the load back onto using CSS.
And the list could go on. Being the dork that I am, I must admit how nice it is to know all of my pages validate 100% with XHTML 1.0 Strict — and they look exactly the way I want them to on all browsers, in all platforms. That last bit is the kicker. Sticking with Standards sometimes requires a bit more thought and planning — and it can sometimes mean letting go of something you've been doing for years — but in the end, it's the best practice any web designer/coder can go with.
So how does your site stand up against validation? Head over to W3C's Validator page, put in your site address, and see if you, too, can get the "Passed" badge, too.
Comments:
Add a Comment:
Syndication: ATOM | RSS 2.0