PHP and web hosting
So far, everything has been done by the browser, except for loading files down from the server into the browser, which the web server does at the browser's request - an HTTP request to be more precise.
The file that needs to be downloaded is determined by the URL, the address of a web page the user has typed in, or the link they clicked on; in this case, www.sitename.com/demo.html
(or demo.php
).
Once that HTML file is loaded into the browser, everything in it is read, including <img>
, <script>
, and <link>
tags with href
and src
attributes. The browser will come up with a list of more files it needs and turn into a little Oliver Twist by going Please Server, can I have some more?
Once all of that code is present, the browser knows what to do with it and renders the web page on the user's computer or tablet. The script
and style
tags help you to distinguish which part is plain HTML and which is CSS or JavaScript.
Now, how the hell did all these...