Styling individual elements versus collectively
by Rob Mason ~ January 19th, 2008 Filed under: Web standards.
A debate over at Web Designer Forum prompted me to help out a newbie web designer with some advice. He was confused as to the correct usage of a div and span and then associating a class or an id.
This example I created helped illustrate the point, but the discussion also prompted me to consider the usage of a common HTML element, namely the span.
Between us we did struggle somewhat to come up with a suitable answer for when should or would you use a span? To date I’ve only used the span element once or twice. Once for Microformats within my main site and once at work where an input form needed an asterisk for mandatory items, which in turn needed to be red.
I’m still struggling to comprehend the W3C’s standards documents and so interpret a correct use? Far as I can tell you use it to identify, then maybe style a selection of code within another element…why I don’t know, but I could if I wanted to. Anyone have any thoughts as to other uses?
Contact Rob for details on website design and build services in Tewkesbury, Gloucestershire.


