Extract Header and Footer From Website HTML

June 11th, 2014 - Posted by Steve Marks to (X)HTML / CSS, Web Development.
- or -

A lot of projects we undertake begin with us copying an existing site’s HTML to use as the foundation for further updates. Whether it be implementing a site into a Content Management System, or maybe someone has lost contact with their existing developer and needs us to clone the site, there are a number of reasons why we find ourselves delving into an existing site’s code.

Once we’ve obtained the HTML, the first step is to always extract the header and footer from the code and move it to a common file such as header.php and footer.php respectively. Depending on the size and complexity of the site this can be quite tricky so I built a tool to help us with this part of the job and wanted to share it in the event others come across this scenario.

Simply enter the website address above and the script will look at the first two pages it comes across. It will then produce the HTML that is common between each and that it assumes is the header and footer.

This entry was posted on Wednesday, June 11th, 2014 at 8:46 pm by +Steve Marks and is filed under (X)HTML / CSS, Web Development. You can follow any responses to this entry through the RSS 2.0 feed.

Fear not, we won't publish this

Comments (0)

No comments have been left yet. Be the first