How to execute PHP code on *.html files

You know it's a default feature of PHP that you can write HTML codes directly on a PHP script. But have you ever thought about to bounce it? That means write your php codes on a HTML file?