HTML is the markup language that defines the structure of web pages. Every web page uses HTML. It is not a programming language, but a subset of XML. Web browsers parse HTML to determine how a web page and its elements, like headings, paragraphs, and images, will look when rendered. Static HTML pages can be served directly by a web server and usually have a .htm or .html extension. PHP is a scripting language that runs on a web server. It must be executed to return results.
Usually identifiable with the .php extension, PHP is commonly used in web development to generate HTML on dynamic websites. The difference is that PHP can return more than HTML; it also generates other text-based data like JSON, as well as images and binary data. PHP developers work on server-side or back-end code, while HTML is used to develop the front-end of a website.