Web Analytics Made Easy -
StatCounter font-tag vs. CSS - CodingForum

Announcement

Collapse
No announcement yet.

font-tag vs. CSS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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
    FONT and BASEFONT are deprecated.

    Zvona
    First Aid for
    Web Design

    Comment


    • #3
      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

      Comment


      • #4
        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

        Comment


        • #5
          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.

          Comment


          • #6
            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

            Comment


            • #7
              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

              Comment


              • #8
                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

                Comment


                • #9
                  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

                  Comment


                  • #10
                    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:



                    boxer_1
                    CodingForum Moderator
                    "How did a fool and his money get together in the first place?"

                    Comment


                    • #11
                      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.

                      Comment


                      • #12
                        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

                        Comment


                        • #13
                          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
                          CodingForum Moderator
                          "How did a fool and his money get together in the first place?"

                          Comment

                          Working...
                          X