Extract CSS From HTML

I have run some Office HTML through HTML Tidy and have ended up with lots of stuff like this

<td><font size="1" face="Arial Narrow"><b>Asia</b></font></td>
<td> <br>
<font size="1" face="Arial Narrow"><b>Autralasia</b></font>
<p align="center"><font size="1" face="Arial Narrow"><b>Australia</b></font></p>
</td>
<td> <br>
<font size="1" face="Arial Narrow"><b>Europe</b></font>
<p align="center"><font size="1" face="Arial Narrow"><b>UK</b></font></p>
</td>


Is there any way to refactor all the font and bold tags out to a separate CSS style block at the top of the file?
2 comments
Comment actions Permalink

Yes, just remove all the font stuff from the HTML using Search and Replace and add CSS to style everything that goes. What you have there is obsolete tags, those will have to go ie: FONT and align="center" really have to go.

0
Comment actions Permalink

Thats not really the type of answer I am looking for.
I can do all that with notepad. :|

I want IDEA to do it for me with a refactor quick fix.

EDIT: I just noticed that the free version of HTML-Kit has this option
Actions - Tools - HTML Tidy - Remove font tags

Message was edited by: opticyclic

0

Please sign in to leave a comment.