[thelist] Combine CLASS attribute + STYLE attibute

aardvark roselli at earthlink.net
Fri Mar 30 14:58:37 CST 2001


what he said... one additional note... instead of using the <span> 
tag, try to find some valid HTML tag that implies true structure 
instead... define a style for it, class it, insert inline styles, however 
you want to do it, but using HTML that has structure is not only 
easier to modify, but works better across all sorts of 
devices/browsers (i'm thinking of browsers for the disabled and 
such)...

many folks here know of my anti-<span> stance... i will always use 
a structural tag and style that, or use the container...

for instance, when displaying an order number on a receipt, i could 
do:

Your order number is <span style="color:#ff0000;">6</span>

or i could try:

Your order number is <strong style="color:#ff0000;">6</strong>

but then, i've found i only tend to style elements when they stand 
out for a reason other than just eye candy, so i've got a different 
perspective on that...

> From: "John Corry" <webshot at neoncowboy.com>
[...] 
> You can use the class attribute to format elements globally (or,
> semi-globally depending upon your use...whether in linked style sheets
> or document specific style tags) and the style attribute to either add
> to, modify or override formatting done by the class, inline.




More information about the thelist mailing list