Difference Between PHP and HTML

HyperText Markup Language, generally known as HTML is the foremost markup language for the web pages. HTML is the basic building block of Web pages. The web browser reads the HTML document and writes them in audible or visual web pages. PHP (PHP is the Hypertext Preprocessor) is a server side scripting language, specifically used to develop dynamic and interactive Web pages. PHP scripts can be attached to documents in HTML.

What is HTML?

HTML, as mentioned earlier not a programming language but a markup language. Markup language is a group of mark up tags and HTML uses these markup tags, known as HTML tags, for describing web pages. HTML documents describe Web pages containing HTML tags and simple text. HTML tags could be identified easily in an HTML document because they are surrounded by brackets (eg. <HTML>). HTML tags are inserted in a characteristic manner to a document in pairs, where the start tag is the first tag (eg. <b>) and the second one is end tag (eg. </ b>). Web browser (Internet Explorer, Firefox, etc.) reads an HTML document and display it as a Web page. The browser uses the HTML tags to interpret the contents of the HTML page and the labels themselves are not displayed by the browser. HTML pages can set images, objects and scripts written in languages ​​such as JavaScript. In addition, HTML can be used to create interactive forms.

What is PHP?

As mentioned earlier, PHP is a scripting language that is especially suitable for developing dynamic Web pages. PHP is open source software is free to download and use. Web servers are used to execute the PHP scripts. The PHP code in file called for, is executed by the PHP runtime and creates the Web page content dynamically. PHP can be deployed in most web servers (Apache, IIS, etc.) and it operates on various platforms including Windows, Linux, UNIX, etc. PHP can also be used with many RDBMS (Relational Database Management Systems).While PHP was originally designed to create dynamic Web pages, it now focuses primarily on the server side scripting where it provides the dynamic content of a web server to a client. PHP files may 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”
The difference between HTML and PHP

The main difference between HTML and PHP is that HTML is markup language which is used for specifying the contents of a Web page, while PHP is a scripting language. Web pages created using only HTML web pages are static and they will always be the same each time they will be opened but the files in PHP format can create dynamic Web pages where the content may change from time to time. For example, dynamic web pages created with PHP may include items such as the current date and time, the data submitted by a user using a form or information from a database.


Category: VS  |  Tags: