Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    font-tag vs. CSS

    Hi, I'm just wondering if there is a reason to use the font-tag to get text into shape.

    Why don't use only CSS?

    Does anyone got an idea why Dreamweaver still supports the font-tag ?

    In my opinion is using the font-tag a sign for bad HTML-design, isn't it?


    greetings


    Joanna

  • #2
    Regular Coder
    Join Date
    May 2002
    Location
    Helsinki, Finland
    Posts
    231
    Thanks
    0
    Thanked 1 Time in 1 Post
    FONT and BASEFONT are deprecated.

    http://www.w3.org/TR/html401/present...html#edef-FONT
    Zvona
    First Aid for
    Web Design

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Dallas, Texas
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i just started using css a few months ago. i think it is the better way, especially since font is deprecated, like you said. i think it is just going to take a little while for everyone to make the conversion to css

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In my experiances CSS font attributes have not always been compatible with other browsers. So i think that html font tags are the best way to go.
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    North East England
    Posts
    853
    Thanks
    0
    Thanked 0 Times in 0 Posts
    CSS is far more powerful; you can predefine classes - in a *.css for more power - and re-use them throughout a page or even site. Obviously there's little advantage in terms of byte reduction unless you have recurring code but most people have enough of that for it to be beneficial and it's a godsend when changing the look of multiple pages.
    [+] Computer/PC issues [+] Silverpaw3D
    ------------------------------------------------
    Never buy a dwarf with learning disabilities...

    ...it's not big, and it's not clever.

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'd say CSS, the only font i ever use is verdana anyways, but when i want to change the style of a whole site, its not my idea of fun to change every font tag

    but... one of the sites i made was aimed at IE5+, with a text only version for practically everyone else. On that one i used <font> tags because I'm not too sure how supported the CSS thing is...

    thats my views anyways
    redhead

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Tags for presentation (like the FONT tag) are typical for older versions of HTML; the last version of HTML, 4.01, and the new XHTML 1.0 strongly aim for seperation of structure (HTML) and presentation (CSS) and therefore deprecate such tags.
    The only reason for using tags like FONT instead of CSS may be browser incompatibility, but for the rest using tags like these is considered bad coding practice.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #8
    Cam
    Cam is offline
    New Coder
    Join Date
    Jul 2002
    Location
    Toronto ON Canada
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    font-tag vs. CSS

    I'm just starting to use CSS as well. Font-tags (as has been pointed out) help with really old browsers pre- IE/NN 4 (depending on the characteristic). What I think the major down-side is (and has been already discussed) is the difficult with maintenance. Maintaining a site which uses font tags can be a real pain in the posterior orbus. CSS makes it much easier and you can make global changes (ie. multiple pages) without editing each one (unless you decide to monkey with the class names).

    For a simple page, font tags may make for less work, but I think its generally a less flexible and long-term viable option.

    Cheers

    Cam

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ronald,

    Although i do agree with the fact that css is good for a large site.
    I DO NOT AGREE on this:
    but for the rest using tags like these is considered bad coding practice.

    I feel it is perfectly fine to practice this type of coding, for it allows the student to really enter themselve into designing there pages. I believe it is good coding practice
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

  • #10
    Regular Coder
    Join Date
    May 2002
    Location
    Maine, USA
    Posts
    573
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I personally would reccomend using CSS whever possible, with few exceptions. Sometimes I use the font tag if I want to quickly apply a diff color, size, face, etc. to a letter or word within a paragraph with its style (font-size, color, family, weight, etc.)already defined as via CSS.

    One problem with extensive use of the font tag is that the tag may become obsolete and may not be supported by future browser version releases. IF or when that happens, it could become quite a task for all those who used the font tag extensively to go back through every page, remove the font tags, and impliment CSS in order to make their page compatable with the new (yet to be seen) browser version that doesn't support the font tag. *Old cliche* 'An ounce of prevention is worth a pound of cure' . Here's a couple of links inline with this discussion that may or may not be of interest:

    http://campus.leeds.ac.uk/guidelines...deprecated.htm

    http://www.htmlgoodies.com/html4-ref/part4.html
    boxer_1
    CodingForums Moderator
    "How did a fool and his money get together in the first place?"

  • #11
    Regular Coder
    Join Date
    Jun 2002
    Location
    North East England
    Posts
    853
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by boxer_1
    I personally would reccomend using CSS whever possible...
    Me too, for positioning too.
    Originally posted by boxer_1
    Sometimes I use the font tag if I want to quickly apply a diff color, size, face, etc. to a letter or word within a paragraph with its style (font-size, color, family, weight, etc.)already defined as via CSS.
    I've taken to using span's for that stuff.

    CSS gets rid of the need for a dozen nested tags, that's gotta be good for browsers and coders alike.
    [+] Computer/PC issues [+] Silverpaw3D
    ------------------------------------------------
    Never buy a dwarf with learning disabilities...

    ...it's not big, and it's not clever.

  • #12
    Regular Coder Feyd's Avatar
    Join Date
    May 2002
    Location
    Los Angeles, CA Maxim: Subvert Society
    Posts
    403
    Thanks
    0
    Thanked 0 Times in 0 Posts
    To add on to mouse's post, the SPAN tag is specifically for the application of pure style (color, size, weight, etc.) and thus using the deprecated font tag to do that, when you have the span at your disposal, is kind of...well, you get the idea
    Moderator, Perl/CGI Forum
    shadowstorm.net - subvert society

  • #13
    Regular Coder
    Join Date
    May 2002
    Location
    Maine, USA
    Posts
    573
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Feyd
    To add on to mouse's post, the SPAN tag is specifically for the application of pure style (color, size, weight, etc.) and thus using the deprecated font tag to do that, when you have the span at your disposal, is kind of...well, you get the idea
    Did you add to Mouse's post or use it as a vehicle to point out the imperfections of my post ? (j/k) Yes, I agree that the span element is more suitable than the font element for applying styles such as color, font-size, font-weight, etc.

    I DO use the span element as well, but also admit that I still use the font element on occasion if I want to quickly apply, for example, a different color to a word in a paragraph where the style for the paragraph is already defined in my style sheet. Not saying it's the right / best way, just being honest and saying it's the way I sometimes do it. A habit that needs to eventually go just as anyone using the font element period. The center element is also deprecated and may become obsolete, do you ever use that?
    boxer_1
    CodingForums Moderator
    "How did a fool and his money get together in the first place?"


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •