Welcome to WebmasterWorld Guest from 54.144.48.103

Forum Moderators: open

Message Too Old, No Replies

Dreamweaver and font tags

why so many?

     
8:50 pm on Nov 15, 2002 (gmt 0)

10+ Year Member



Hi -

Are there Dreamweaver users out there that have a problem with DW adding extra font tags to pages? Even though the body of a document is all one font it stll seems to add them to every <p> and within each table cell... I've looked in preferences to see if I can change this behavior, but found nothing.

Is there a reason for all of the font tags? I find that it makes the code much more difficult to edit (which often I do remotely via EditPlus). They just seem so unnecesary to me.

I was hoping HTML-Tidy would remove the unneeded tags, but no luck...

thanks! :-)
- Wendi

8:53 pm on Nov 15, 2002 (gmt 0)

WebmasterWorld Senior Member digitalghost is a WebmasterWorld Top Contributor of All Time 10+ Year Member



From the command menu you can opt to clean up HTML and XHTML. That should remove all empty and unnecessary tags.

<added>HTML-Kit will also strip font tags prior to making a document XHTML compliant. It strips ALL the font tags though so you'll need CSS to mark up your text. </added>

8:59 pm on Nov 15, 2002 (gmt 0)

WebmasterWorld Senior Member agerhart is a WebmasterWorld Top Contributor of All Time 10+ Year Member



>>>>adding extra font tags to pages

DIV tags too!

>>>From the command menu you can opt to clean up HTML and XHTML

This doesn't always work that well. Doing it manually will give you the best results...unfortunately.

12:30 am on Nov 16, 2002 (gmt 0)

10+ Year Member



I think DW puts the "extra" font tags in there for some older versions of Netscape. Sometimes if you don't have the codes all over the place, the page won't show up correctly in pre-v.6x Netscape.

I know older NN versions need some odd things like putting CSS classes in table cell tags to get the page to show properly. DW doesn't do this for you. You have to hand-code it into the proper place most times.

The extra font tags could be related to this somehow.

3:31 am on Nov 16, 2002 (gmt 0)

WebmasterWorld Administrator martinibuster is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



What version of Dreamweaver are you using? I've used 4 and mx and have never experienced this.

I think you should bust out your property inspector and make sure it's font property is set to none/default.

I always use the <p> tag because I style it and that makes it easy to update the fonts for an entire site.

What version of Dreamweaver are you using?

4:14 am on Nov 16, 2002 (gmt 0)

10+ Year Member



Ya know, martinibuster, now that you mention it, the pages I was thinking of with all the extra coding were old hand-coded pages. Either that or pages I had created when I was first getting to know DW4.

I'd get confused, forget to set a default font, then wonder why my fonts weren't showing up correctly. I'd set the font in the Property window, then have extra font codes all over the place. There'd be extra "font color" tags everywhere too for the same reason no page default color for my fonts.

Could this be what's happening to you, gibsonRB75?

6:07 am on Nov 16, 2002 (gmt 0)

WebmasterWorld Administrator martinibuster is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



That's when the old find and replace function comes in handy! ;)
12:06 pm on Nov 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's a bit of an urban myth that Dreamweaver goes on the rampage and starts inserting unwanted font tags by itself.

This tends to happen during use of the Property Inspector when users decide to make a block of text green, then change their mind and increase the size, and then decide they don't like it and cancel their changes. In this case, empty font tags are left hanging around because Dreamweaver has been trying to insert inline styles - one of the "bad" points of the programme, but popular with people moving from, say, Word.

Easier and better is to use the Page Properties to set up certain things like bgcolour and font properties.

Even better, and if you have MX it's a breeze because you can do it from the Property Inspector, is to set up CSS styles for the page.

And even better than that is to use an external stylesheet.

12:55 pm on Nov 16, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



gibsonRB75,

If you change the font, via highlighting the text block then you are telling dreamweaver to change from the default text which carries no DM defined font, and leaves the font to the mercy of the viewing browsers preference. DM is a bit of a bugger for doing it, but if your working off multiple templates, then you can easily get around the problem.

8:30 pm on Nov 16, 2002 (gmt 0)

10+ Year Member



Thanks to everyone for the input.

I am using DW4 (they haven't bought me MX yet).

I inherited the site that I maintain (which was created in DW) and it has always had a ridculous amount of extra font tags. Pages added with the templates have been as bad.

Guess I need to more cautious of how I apply fonts to pages ... and get better at CSS. ;-) At least the pages that I add can have clean code.

Thanks again!

 

Featured Threads

Hot Threads This Week

Hot Threads This Month