Page 1 of 1

Removing internal styles from each .html file

Posted: Sat Sep 20, 2008 6:27 am
by mubashir09
Hi
i have hundreds of pages on my website which use internal styles sheet for each page. But now i want to remove internal styles and will put just a single external style sheet as internal style sheet are taking more bandwidth.

Can any body help me how i can remove everything between <style>....</style> inside my all html pages.

i have done so far is

filename = $file;

//reading file contents
$handle = fopen($filename, "r+");
$contents = fread($handle, filesize($filename));
fclose($handle);


dont know what to do further .....

waiting for someone help.
thanx

Re: Removing internal styles from each .html file

Posted: Sat Sep 20, 2008 6:58 am
by adroit
Hi Friend,

You can use Dreamweaver or editplus to find and replace content between the tags. You have to properly use the different options while searching the content between the tags.

And one thing, just don't forget to take backup of all the files.

Regards