PHP vs HTML
HyperText Markup Language, widely known as HTML is the leading markup language for web pages. HTML is the basic building block of web pages. Web browser reads the HTML document and composes them into visual or audible web pages. PHP (stands for PHP: Hypertext Preprocessor) is a server side scripting language, specially suited for developing dynamic and interactive web pages. PHP scripts can be embedded in to HTML documents.
What is HTML?
What is PHP?
As mentioned earlier, PHP is a scripting language that is specially suited for developing dynamic web pages. PHP is open source software and it is free to download and use. PHP scripts are executed on the web server. PHP code in a requested file is executed by the PHP runtime and creates the dynamic web page content. PHP can be deployed in most web servers (Apache, IIS, etc.) and runs on different platforms such as Windows, Linux, UNIX, etc. PHP can also be used with many Relational Database Management Systems (RDBMS). Even though PHP was originally designed for creating dynamic web pages, it now focuses mainly on server-side scripting where it provides dynamic content from a web server to a client. PHP files can contain text, HTML tags and scripts. PHP files are processed by the web server and returned back to the browser as plain HTML. PHP files can be identified with the file extensions “.php”, “.php3”, or “.phtml”
Difference between HTML and PHP
The main difference between HTML and PHP is that HTML is a markup language that is used to specify the content of a web page, while PHP is a scripting language. Web pages created using only HTML are static web pages and they will always be the same every time they are opened. But PHP files can create dynamic web pages where the content might change from time to time. For example, dynamic web pages created with PHP can include objects like current date/time, data submitted by a user using a form or information from a database.