Forum Moderators: not2easy

Message Too Old, No Replies

Using Classes with Font Tags

         

tedster

4:34 pm on Aug 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've been asked to consult for a business that builds template-driven sites within their industry niche. They use CSS to assign class to font elements, and with 2,000 client sites out there, that makes a lot of <font class="f4"> tags!

They do this because it makes it very intuitive for their clients to edit their own site's css. But with the font tag being deprecated, I'm wondering what our members here think about taking this practice forward. Currently browser support is extremely good.

NickH

4:58 pm on Aug 16, 2003 (gmt 0)

10+ Year Member



tedster,

For equally intuitive markup, how about transforming
<font class="f4">
to
<span class="font-f4">?

Nick

MWpro

5:22 pm on Aug 16, 2003 (gmt 0)

10+ Year Member



I've seen this before and don't really think it's a good idea. Instead, they should learn how to use h1, p, em, strong, span, etc correctly and learn how to apply the styles to those.

tedster

5:44 pm on Aug 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks - that is my impression of this practice as well. Since I'm probably going to consult on the next "re-factoring" of their template, I wanted some input on my gut feeling here.

I like your idea, Nick. It could even be condensed further to creating a class called .font4 with little loss of "intuitivity". And they should get a decent savings in file size if they apply the class to their <p> elements instead of using all those font elements.

I realize that it's hard for us to predict, but I wonder how long this practice will be "future proof". Seems to me that browsers will need to support the font element for quite a while - maybe five years or more. New sites are still being launched every day using the deprecated font element, thanks to WYSIWYG and Microsoft Office. And since that's the case, I must assume that browsers will support this practice well into the future.

This becomes a very pragmatic business decision for a company like the one I'm working with. There's got to be an ROI for making a sweeping change like this over many clients, and though the purist in me wants to recommend that they do it, I'm not totally convinced that they should, at least not for legacy sites.

NickH

5:49 pm on Aug 16, 2003 (gmt 0)

10+ Year Member



I second MWPro's comments regarding document structure and use of semantic tags.

Correctly used, <font> should contain only inline elements, and hence can be replaced by <span>. If it's being used to contain other content, you have more work on your hands!

Nick

madcat

12:31 am on Aug 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I must assume that browsers will support this practice well into the future.

Yeah they will have to support these tags well into the future. I believe that the difference lies in where that data will eventually be able to run. Slicker browsers, new appliances, different formats and better software programs that integrate with newer technologies- which lead to a wider variety of possibilities for your information.

So to me it's not so much about making your websites 'future proof' for web browsers as it is making your information capable of greater functionality in the future.

That's just my take on it.