August 30, 2003
The topic of the week among the elite group of designer-bloggers has been semantics and how they relate to valid XHTML and CSS. It all started with Jason Kottke pointing out that valid code doesn't necessarily imply semantical correctness. It has been further discussed at Stop Design, Superfluous Banter, and Simple Bits. Anyone who is interested in web development best practices should read all of these discussions -- they have proved valuable reading for me.
I started the journey towards web standards a few months ago, and my first real site developed with this goal was theplaceforcooks.com. The CSS for that site validates and the general template I built for the site validates, but not every individual page does. It was tough, and unfortunately I found that the error reporting on the W3C Validator Service isn't as helpful as I thought it would be. My next project was the redesign of the Esplodere Web Design site, which was a little smoother (thanks in part to my choice of a more fluid layout) and I'm feeling more comfortable with designing for standards each time I approach a new page.
And now semantics are the next step. The most obvious example is using CSS for layout instead of tables. This has caught on quite well throughout the design world, but as Jason Kottke mentioned you can still get a table layout page to validate in XHTML. There are even some big design shops still using tabled layouts.
An even better example of proper semantics is using (h1) instead of (span class="title"). Either tag can be rendered to look the same way using CSS but (h1) is more meaningful -- it more aptly describes the content contained between the two tags. I'm going to continue reading up on this and work to implement these practices into all of my designs from here on out.
Posted by JohnH at August 30, 2003 10:42 AM | TrackBackI like My Goofy coding. I plan on getting into CSS more. I want to set up a good weblog myself. I went deap into for like 3 months one time. HTML and some XHTML and then i braved CSS but walked away. Now I wish i could do some flash And CSS. I got the HTML down for the most part and Scripts should be next.
Posted by: james at August 31, 2003 07:31 PMJames, why not sign up for a free blog on ATLblogs.com? I think I've convinced Margaret to get one there.
Posted by: John at August 31, 2003 08:43 PMi would like to author my own. I may do that for a temp thing though. Thanks!
Posted by: james at September 1, 2003 06:24 PMWell ATLblogs is just a hosting service really, and they use Moveable Type, which is the best weblog "software" there is.
Posted by: John at September 1, 2003 11:59 PMI still do my layouts using tables... Why?? I understand the spacial relationships between the cells better than using div/span/etc. However, I have been moving towards standard compliance in the previous couple of months. My problem lies here: I develop using PHP. Validating the static HTML won't be the problem, but validating the php-generated HTML will. I have been trying to figure out what approach to generating HTML will not greatly affect my php readability. As of right now, my php code is fairly readable, but not even close to compliant. When I have tried to make it compliant, my phpcode becomes very saturated with escapes (and tab/newline characters... since id be going for readable, formatted HTML output as well). I have not found a good happy medium. If anyone has any suggestions, I'd love to hear.
Posted by: kposey at September 3, 2003 10:48 AMI was really shocked when 3HD put out a site using tables, Williams Web does the same thing. We do some work with an out-of-town company, who couldn't understand why I was mad when they didn't put a doctype in their html or why closing a paragraph tag was important. We paid these people more than I make in a year, just to get their database working with our site...and their designers were doing what was a throwback to 1998, era design.
I still use tables for the Erlanger site and it's validated xhtml and css, and about 85% section 508 valid. Tables were/are a good layout framework, but it's wrong in the sense of not being semantically correct. I can make my pages reflect the xhtml docs by using h1 properly, but when the site was being developed, I had a large percentage of Netscape 4 users. It was more important to make the site usable for all browsers, instead of modern browsers. Now I'm committed to that design for at least another year. Everything else coming out of my office, is tableless, but that design is "stuck" where it is for another 12-18 months. Frustrating, isn't it?
Posted by: Mike at September 3, 2003 04:39 PMMike:
It surprised me to see that as well, Mike. The code was pretty readable, but littered with spacer gifs, table widths, etc. to the point that it was easily twice as long as it would be if done well in CSS.
I understand that there are other concerns like usability for older browsers, as you mentioned, and it's not always the right time to redesign an existing site for CSS. I think it's great that the large-scale tabled site you work on validates and comes so close to being section 508 valid. Very impressive! Cool that all your new sites are done tableless as well.
Kyle:
If I knew anything at all about PHP programming, I'd offer some tips on getting your generated HTML to validate. You should be able to get your HTML templates (before you insert the php) valid, though, as Andy (my partner, the programmer) and I are doing on a current project. Small steps!
Posted by: John at September 4, 2003 06:45 PM