Web pages that really do
something - rather than just feeding out identical information to all visitors - may have a lot of elements to them. Although you may be told "that's written in PHP", "that's Java" or "we use Ruby [on rails]", there are actually many more elements.
Your PHP (or Java / Ruby / Perl / Python ...) elements are just the programming component in which much of the logic will be written. But you'll have other elements too ... here's a more complete "checklist" for you of what you may find within a single "web page" file in what I'll call "HTML++":
- The Markup language for the web page itself. Showing which elements are headlines, which are bold, what the page title, where there are tables and rulings and much more.
- Server Side code. This is the program logic that runs of the server - controlling how form elements and other data are combined to produce the required data to be sent to the browser.
• Natural Language
- For the user! The English (or Welsh, Spanish or Hungarian) text which will be displayed on the user's screen to provide him with the information that's he's requested.
- Client side code. Program elements which are run within the user's browser, for tasks such as checking for valid inputs / helping with suggestions of how to complete words as (s)he types.
- Cascading Style Sheets. The look and feel of page - telling the browser which font it's to use (and colour and size ...) for headlines and body text, and much more.
- Structured Query Language. Embedded within the programming elements, you'll often find this further language which describes how data is to be extracted from the databases on the sever for inclusion in the web page.
All of those elements listed above are often found within a single file - although it's good practise to separate the elements as far as practical so that each can be looked after by an expert in that particular facet - a programmer looking after the PHP code, and a Graphic Designer the CSS. That separation also means that the program logic can be changed without effecting the look and feel, and that the page may be given a "new paint job" without fear of breaking the programs behind it.
But there are further elements too that may be used within a web page - either called up from within the page while the PHP interprets the data, or by a "callback" from the browser when it finds that the HTML it receives calls up something else.
Those extra callups by the browser may include:
• Images - pictures to be included in a web page are downloaded from the server as separate files - the most common formats being .jpg .gif and .png; by having them as separate files, it means that the browser can store an image such as a logo an re-use it on many pages - efficient. It also means that the web site development and maintenance teams can separate the text from the graphics as they look after the site - using the best edit tools for each rather than needing some all-dancing monolith.
• Icon - the file usually called favicon.ico which provides the thumbnail logo that's used in bookmarks, location bars, etc
• Style Sheet files - a commonly shared look and feel that's used as the basis of many / most / all pages on the site
• Flash, Movies, Applets - More (or less) dynamic elements that run "sandboxed" into a frame within a window on the browser, through an appropriate plugin.
And the other server elements outwith the HTML itself may include:
• httpd.conf and .htaccess - files that control how web servers map requested URLs to actual documents or programs held on the web server, and how those programs are then run.
• headers - controls that are sent out to the browser ahead of the content, giving such information as whether the browser is to cache or store the page, whether the image is compressed, status codes, full page name, etc.
I started putting an example with just the first couple of these shown [here]
(run it [here]
) during yesterday's PHP introduction. The script is no more than a "hello world", but it helps to be aware of all the various elements even at this early stage. (written 2010-08-10, updated 2010-08-20)
Associated topics are indexed underQ625 - Object Orientation and General technical topics - HTML for Web Application Authors 
What difference does using the XHTML standard really make? - (2009-06-18)
Some other Articles
Upload Image, Store in database, redisplay in browser. PHP and MySQLTesting the robustness of our hotel and training systems - holiday and sickness timesLooking up a value by key - associative arrays / Hashes / DictionariesOlder picture.Six languages in one file - an HTML++ web pagePredictions for the seagull populationFeeding the GrocklesRobust - testing the systemBe gentle rather than macho ... regular expression techniquesHow Green is my train?