in reply to Re: perlvars
in thread perlvars

Update:

The World Wide Web Consortium's own Cascading Style Sheets language tutorial, Adding a touch of style, written 29th August 2000 by Dave Raggett section What about browsers that don't support CSS? recommends using HTML font tags. Case dismissed.

To be depreciated means there's a newer construct, not that the depreciated construct is obsolete. To the contrary, the spec calls for user agents to continue support for deprecated elements for backward compatibility. That means depreciated constructs should enjoy wider compatability!

In the long run, obsolete constructs seem like a worse idea than the bad constructs that become obsolete, imho. If TMTOWTDI in HTML then WTFN?

Replies are listed 'Best First'.
(ichimunki) Re: perlvars (font tag)
by ichimunki (Priest) on Jan 08, 2001 at 19:03 UTC
    First, it's "deprecated". "Depreciated" means something similar, but is mostly an accounting term these days.

    Second, just because some agents support it does not mean you should continue use. The reason the w3 deprecates the tag is so that you will stop using it. The word "should" is a little loaded. If you read the w3 definition of "should" it clearly implies no real obligation on the part of the user agent to continue to use deprecated tags. It merely states that one might want to do so, in order to ease the transition from HTML3 to HTML4

    Third, the newer construct is called CSS, and gets you to think about how to separate content from layout directives. It's a more orthogonal approach. Generally this is considered a Good Thing (tm).

    I'm sorry I was terse. I didn't mean to detract from the fact that I think you are doing a great job getting started with the above code.
      First, oops.

      Second, basically trashing webpages that don't conform to the new standard rubs me wrong. It's nice to be able to separate content from layout, but it's not always needed or wanted, and shouldn't be mandatory.

      I need to specify fonts in places where css isn't happening (homenodes) or where they make things more complicated than necessary. One Bad ThingTM about css are inlines that break offline. That last sentence required a font tag.

      I remember when there was no font tag. If some people have their way i expect to see css eventually done away with. When css is superceded by the latest ultra-layout concept i hope it's at least retained as still useful, and for compatability with legacy content - just one more way to do it.

      I hope that we're both satisfied to have aired some views on this and that further html discussion will take place via chatterbox /msg. This node is already too huge to host such a dubious debate :-)

      Update: The "trashing webpages" comment is NOT referring to criticism of this script! See below for explaination.

        I think a one line comment about font tags hardly qualifies as trashing a web page. I would rather talk about Perl, so I tried to be brief and non-threatening. *sigh*

        Added after reply: Not that I have a problem with user agents dropping the font tag thereby "trashing" the page, but it seems like a red herring to worry about that-- none of the larger web client projects lack support for it. I'm suggesting the web designer or CGI applications being written now stop using deprecated tags. Simple. That's the whole point of them being deprecated.

        It doesn't sound to me like you've researched CSS at all. If you'd look at it, you'd know that for you inline style addicts you can easily put the actual CSS into the <head> section of your document (or anywhere else in the document for that matter).

        I remember when HTML 2.0 was the standard too. I also remember when I had to program fonts bit-by-bit into my dot matrix printer. Heck, I remember when we had to change the daisy wheel on the TTY to get a different font. </stroll-down-memory-lane> How does that affect solid programming technique?

        CSS is a concept that is being sensibly borrowed for use on the web from a much older discipline known as typesetting. Even PageMaker 2.0 in 1988 had style sheets. Inline font directives are inefficient. If you want to change a consistent style you will be wrestling with search and replace throughout your document. If you must hardcode the style into HTML, at least don't repeat that inefficiency in your Perl.

        my $start_smalltext = '<font size="-1">'; my $stop_smalltext = '</font>';
        This way if I'm reusing your code, and don't want to use size as a display differentiator, I can easily change to use a color, or any other acceptable font attribute.

        I'm not saying these things because I am some blind standard lover. I'm saying these things because you have better things to do with your time than fiddle with trivial bits of code any time you want to make a global change.