Forum Moderators: phranque

Message Too Old, No Replies

cleaning font tags

css swap over

         

soapystar

2:21 pm on Sep 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



cleaning some sites from on page html to css and wonder if there is any software that can remove selected tags..for example i just need to remove instances of font size within html but leave other tags...so it would need to remove the hole tag including </font> where only the size is mentioned but just remove the size part if say clor is set too...

?

choster

6:03 pm on Sep 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you looked at HTML Tidy? [sourceforge.net...]

soapystar

6:51 pm on Sep 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



thanks but i dont think does what im looking for.

TheDoctor

7:47 pm on Sep 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure if there's a way of automating what you want to do, without writing your own program. But if you are driven to having to amend/delete each entry manually, then possibly the easiest method is to use the "view structure" facility in Amaya. You get Amaya free of charge from W3C.

Open the document, got to View->Structure. Select the font tag you want to amend or delete. If you want to delete it, got to Edit->Transform->Remove font. If you want to get rid of the size, but leave the font in place, then go to Attribute->Size and then choose "Remove attribute".

Long-winded, but you can guarantee not being left with hanging "/font" tags or similar.

soapystar

9:00 pm on Sep 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ok..i may be totally dumb but....i can only see how to do that one at a time......?

TheDoctor

9:16 pm on Sep 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep. One at a time. If you can find some way of automating the process I'd go with that.

But, if you have to do it one at a time, using the "view structure" method I suggested is probably the fastest way. It's also the least dangerous, in that you're not going to be left with invalid HTML because of problems caused within the chair-keyboard interface (highly likely when doing a boring, repetitive task).

soapystar

9:51 am on Sep 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



thanks for pointing me to the software but its not what i was looking for. Oh well, back to cleaning one by one.....

jetboy_70

11:14 am on Sep 14, 2004 (gmt 0)

10+ Year Member



Textpipe Pro will do it, but you'll need to have a grasp of regular expressions. The Regex Coach is a freeware app that can help you with that.