Adam Perfect

General

Pro tips... not so pro?

I would have posted this on Friday, but I've been having severe trouble with my site going down so here it is now... Via CSS Beauty, I found .net magazine's 20 pro tips article online. It's an article listing 20 tips for writing better HTML/CSS, apparently handed down by professionals. It then goes on to list some helpful tips as well as some unhelpful or plain contradictory ones. The main one that got me was tip 14: use semantic markup which followed on to the contradictory tip 17 on wrapping textaround images. Tip 14 is sensible - use semantic markup when writing your HTML (though it lacks any info for the uninitiated as to what semantic markup actually is, or links to places to find out). Tip 17 then provides, as .net describes it (quite accurately), "a quick and dirty way of wrapping text around images". They suggest using the align="left" (or "right", etc.) attribute in the image tag. What happened to semantic markup and doing any kind of presentation in the CSS? Would it have been that hard to provide a CSS class to do the alignment and explaining why that's a better way of doing things? After all, these are 'pro tips', not 'HTML techniques from the pre-standards era'. Tip 9 uses the inline style attribute as well. Why? In other tips they provide CSS definitions so they're obviously assuming their readers can figure out how to use separate stylesheets. Rather than have style="..", provide the CSS:

form { margin:0; padding:0; }
It's no wonder people end up writing poor code when the major magazine in the UK on web development is providing pro tips that are anything but. I actually had to check that CSS Beauty hadn't accidentally linked to an article from a few years ago, but no - it really was added just this month.

Written by Adam on

Adam is a Director of User Experience by day and photographer as time allows.

You may also like…