Ninis World


Strip <font> tags in Adobe GoLive CS

BACK TO TUTORIALS AND LINKS CONTENT

The time has come when most of us are re-building our old sites and making them ready for use of CSS, Cascading Style Sheets. Be it only for the textformatting and ease of updating the look of text formatted with CSS or be it for a full structural re-build of the site.

Our old sites probably though contain old formatting and extensive use of the <font> tag all over the place. To be able to apply textformatting with CSS the site first needs to be stripped of all <font>-tags.

To get rid of old <font>-tags to move sites to CSS, one feature in GoLive is extremely useful: GoLive's "Find by element".

You can use it for instance to strip all your <font> tags from single pages or whole sites with one click.

Remember to always work on a copy of your site when doing this, in case something should go wrong.

Thanks to the OmniPilot GoLive mailing-list and Martin Sammtleben in particular (who did a description of how to do this in GoLive 6), this is an explanation for how this can be done in Adobe GoLive CS:

Find window in GoLive

1. Open the Find window and select in Multiple Files. and then "Code Elements" from the drop-down menu in the upper part of the Find window.

2. To the right of Element it should be set to Is and to the right of that, from the very long drop-down menu, choose font (or type font, if you find the menu too long to choose from).

Find window in GoLive

3. Then open up the part of the window called Change and at Element choose "Replace by its Content". That will remove every occurrence of the surrounding <font>...</font> tag including all its attributes while preserving its contents like text and images.

4. Now in the bottom section make your selection according to whether you want to clean up entire sites or single files and add them to the list.

Find window in GoLive

5. When all choices are done, before you hit the "Find all" button and have it all done, choose the fly-out menu in the window and Save search (call it something like stripfonttag) in the proposed location, so you can use these parameters again and again without having to rebuild them from scratch each time. The name of the search will appear in the fly-out menu from the search-window.

Then click Find all.

Special Bonus Tip from John Donaldson (http://www.afterhours.org.uk/):
Using "Element Matches" in place of "Element Is" and a list of tags separated by a vertical bar you can remove multiple tags in one go: font|b|i|br

DOWNLOAD TUTORIAL AS PDF (180 K)

Back to Tutorials and Links Content

To top of window