...

View Full Version : Bulk Select and Delete Superfluous Font Tags



pnielsen
06-14-2012, 04:15 AM
I have an old HTML website I did in Dreamweaver MX. There are dozens of font tags on each page. After upgrading to CS3, these are now conflicting to the point where I can no longer specify the preferred font type and size via the HTML fields.

Being identical, (<font size="2" face="Verdana, Arial, Helvetica, sans-serif">) is there anyway the tags can be seached for, selected in bulk and deleted all at once, page by page?

Would this in any way potentially disrupt the page structure, apart from ahving all fonts revert to default?

If not, is there another method that is less painless than deleting each tag individually, or redoing the entire website?

Afterward, I would apply CSS to the entire site.

Thank you for any advice.

pnielsen
06-14-2012, 04:17 AM
Sorry folks if that was a repeat thread. I posted similar a few days ago, but could not see it in the thread listings. Please refer me if it appears elsewhere. Thanks.

DrDOS
06-14-2012, 05:11 AM
There are any number of good and free text highlighting editors that will do a search and replace for you. Scite is available for the Nixes, Mac and Windows too. If you have hundreds of pages you can use 'sed' the Stream Editor, which is command line only, or runs from scripts, but it can automatically search and replace over literally hundreds of pages in a session.

What I would suggest, having done this myself, is something like this:



Replace this:
<font size="2" face="Verdana, Arial, Helvetica, sans-serif">stuff here</font>
with this:
<span class="f1">stuff here</span>

Also, when you are doing bulk search and replace, if you have any doubts about wiping out particular blocks of code, just replace the code with a comment tag, you can always remove the comment tag or put the code back.

cord
06-14-2012, 06:30 AM
You can also use dreamweaver CS6 and notepad++ (which is freeware)

pnielsen
06-15-2012, 11:51 PM
The suggestions so far worked well, and everything looks fine in DW design view and IE. But in Firefox, the paragraph font is enlarged one size throughout the entire page.

I am unable to find a logical explanation for this. Can anyone please offer one?

felgall
06-16-2012, 12:48 AM
The font tag was removed from HTML in 1997. There are no longer any such thing as font sizes in HTML.

You should be specifying font sizes via CSS using 1em as the base font size.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum