I was wondering if there is any kind of software who can read an HTML document within a lot of inline styles and convert all these styles into an external css file. If it was only one page, i could do it manually. But there are 100 pages. Anybody an idea?
3 Answers
like someone said, 'there's an app for that'. Here it is: http://www.cssout.com/
2 Comments
mad_fox
This site limits you to 12k characters. Is there a way to convert a file that is larger than this limit?
Mayur Bhamre
This application worked for me as expected. Thank you. Once you get this application on your local. You can make changes in index.php file where you can increase the character limit. update variable $maxDocLen to expected limit.
You can do it easily with PHP. Either use a regex expression (preg_match) to grab content amongst <style> tags or use DOMDocument class as mentioned here