If readability is your issue, putting this page in its own file is as best as you can hope for. You can fully expand the html in its own page, so it is readable, yet it is also equally functional. If optimization is your concern, this is not the approach you should take. There are plenty of libraries in php that will compact these files for you. In the long run, it is not worth it to you to try to squeeze everything into one line, even for a page that isn't likely to change.