HTML is Hypertext MARKUP language. You can't do much more with HTML then present information in a nice, organized, and pretty way. If you want a static web page, like one that simply gives information about something or other then HTML will do.
If, however, you want an interactive page that has users and updating information (like weather for example) then you really need PHP. PHP is a scripting language, it allows you to mutate and access data stored on a server or entered by users. You combine PHP with HTML to dynamically get data (with PHP) and output it nicely (with HTML).
It's sort of like the difference between math and art. With math you can model a function that users can input stuff and get unique output; this is PHP. With art you make something static that others can look at and enjoy but not do much with; this is HTML.
What is the difference between a PHP and HTML Web page?
PHP files are just like HTML files, but they can include both HTML and PHP code. The PHP code is parsed (or executed) by the Web server when the page is accessed and the resulting output is written as HTML within the Web page. When a user accesses a PHP page, his Web browser only gets sent the HTML code, since the Web server has processed the PHP code in the background. Most PHP pages are processed so quickly that it does not noticeably slow down the loading of the Web page.
The .php extension is important, since it tells the Web server that the page may include PHP code. Therefore, it must be run through the server's PHP engine before being sent to a client's Web browser. This allows dynamic content to be generated each time the Web page is loaded, based on the variables included in the PHP code. For example, PHP pages may load objects such as the current date and time, data from form fields submitted by a user, or information from a database. Still, once the page reaches the user's Web browser, everything is formatted as HTML.
It would be nice to thank or give a reference to the originating author or even to post a link to the site, not to try and pass of your post as if it were your own authoring - which is commonly referred to as plagiarism.
The correct and no mistakes in the English was the clue that gave you away.
Perhaps a moderator might like to deal with this errant post.
If you're not familiar with the differences between the two (and there have been some good, concise posts illustrating that difference), i would first learn HTML, learn it well, and be clear on what it can and can't do. Once you understand that, then roll up your sleeves and dive into PHP; the reason being, if you're struggling to get things just to look right in HTML (which you will, if you're in the process of learning it), then imagine the terrible frustration you'll encounter when trying to make those elements interactive...because that's what PHP does.
Basically, PHP 'builds' an HTML web page on the server side. While you can 'View Source" in a web browser and see exactly how and why the page looks like it does, you'll never see the PHP behind a website, because by the time the page gets to you, PHP has already done it's job.
Furthermore, PHP is a great deal more complicated than HTML. Really, HTML is not a programming language...it's a set of tags that tell a browser how to display things, for instance, a green text box might look like this:
<div height="200" width="200" background="green">Some Text</div>
It's just formatting, plain and simple. PHP, on the other hand, is what you would use to make the page load "Some Text" automatically from a database, in the form of a news article, or a greeting to a specific user who has logged in.
These days, just about every site on the web uses a PHP backend, or something similar to it, so learning the language is a very worthwhile investment of your time.
I totally agree with you. I am very god with html after learning it but I have just moved onto php. Woah I wasnt prepared. Thees so much to it. Its not similiar to html atall and you also need to know a nit of mysql to get most things to work.
HTML is great for static sites, but if you want to generate pages programmatically (or if you need to access a database like MySQL) you'll want to move to PHP or Python. You can learn about HTML and PHP (as well as CSS and a host of other languages) from the W3Schools tutorials, some of the best on the web.
But anyway, if your page is constantly changing/evolving then PHP is on the go..and take note that PHP do processed the script so that it will be rendered as HTML..but if it is just a static then I believe a HTML will be the best, since it will be faster compared to PHP.
i see a lot of good points presented above
to distill into a short post
you have to know HTML to do php
if a web page were a clock, HTML would be the clock face and PHP would be the gears behind the clock face
building an HTML page would be the equivalent of drawing a nice picture of a clock
programing in php would be the equivalent of building a clock that works, but unless you know how to design a clock face then all the gearing in the world will be useless.
It would depend on what you want your site to do/be. If you want just a simple showing a few pics and some static information, the html would suffice. If you need some more complex elements, like forms and other elements involving interaction with visitors, then it is not sufficient and you would then require some server side processing language like PHP.