File or Web Server?

Why your page's address starts with file:// while all the pages you visit starts with http://?

The page you just created was served directly by you OS's file system while the pages on the internet are served by a Web server or technically a HTTP server. Realy a program running in some OS. The most common configuration is the Apache web server running in some Linux flavor.

What the HTTP server does is talk to the clients, the browsers or others, using a specialized protocol, the HTTP protocol. It means that not only the contents of the page are sent by the server, but also other informations are exchanged that can affect both the browser's and the server's behaviors. Yes, both the browser and the server send and receive HTTP messages.

There is a situation in which you can dispense with the deployment of a web server. It is when you will only serve your pages inside a closed intranet and the pages will be static pages, meaning no server side programming language.

We need it

You will need Apache and PHP running in yours or any other server for this tutorial, be your OS Linux, Windows or Mac OS X. When Apache in running in your desktop system, your system is both client and server.

If you are running Windows or Mac OS X download and install a complete package like XAMPP. It will give you Apache, PHP, MySql, FileZilla and some more.

If you are running Linux the best approach is to follow your distribution's instructions on how to install Apache and PHP, although you can also install a package like XAMPP.