How Does a Website Work?

A friend told me the other day that although he read all my articles he didn’t understand any of them.  Not one.

Which gave me an idea …

Why not set up a new category and write a bunch of articles for people who are absolutely, completely new to the web (and possibly a bit nervous of the technology)?

Sounded like a good idea to me, so here’s the first one:

How a website works.  

How are web pages made up?

A web page is made up from lots of different files: pictures, text, diagrams and so on.

When you surf the Internet from your PC you’re using a web browser – Internet Explorer for example.

So when you look at a web page on your PC, Internet Explorer receives all these files and puts them together to display the web page as you see it.

All these files have to be stored somewhere centrally, so that anyone using the Internet can see the web page from anywhere in the world.

The place where they’re stored is called a web server, or simply just a server. This is because it serves websites to people who ask to see them.

And the tool that you use to pass this request to the web server is your web browser – Internet Explorer.

Your web browser is also known as the client, because it’s the party to which the server serves the files.

So what happens when you type in a link?

When you type a link into your web browser this is what happens:

Your web browser (Internet Explorer) sends a request to the web server that stores the files (1 above)

The web server looks up the page that’s been asked for, collects all the files that make up that page, and then sends them all back to your web browser (2 above).

Your browser receives the files and lays them out on the screen so that the web page is displaid for you to read.

Nothing too complex there, right?

Great – you now know how web pages work.

So what about all that jargon and those abbreviations?

The base language (or code) that web browsers use is HTML.  You’ll hear that mentioned quite a lot.

But HTML is a pretty basic language and, actually, very simple.

So other languages (or codes) have been developed to enable more and more functionality to be built into websites.

These codes all have to work with HTML.  So think of HTML as the base platform which all these other codes sit on top of.

Some of these codes use the power of the web servers to manipulate information that people visiting the web page type in. They’re then able to take pre-defined actions based on the information they see.

For example, if a site is age restricted and someone types in an age that’s below the limit, a language like PHP will take that age information, check it against the age limit, see that the viewer is too young and prevent them from accessing the site.

Other codes, like CSS, have been developed to improve the efficiency with which things like font styles and colour schemes are defined and displaid.

The last code type you’ll hear about are scripts.  These are bits of code that take the same action each time something happens.

For example, statistics on the number of visitors a site receives are often driven by scripts. Every time someone uses their web browser to look at a page which has the script on it, the script will send a message to its server telling the server there’s been another page view.

So, to summarise:

  1. The files that make up a web page are stored on a server so they can be accessed by anyone from anywhere
  2. When you type a link into your web browser, it sends a request to the server. The server collects all the relevant files for that page and sends them back to the web browser
  3. The browser receives all these files and lays them out on your screen
  4. The base language that web browsers use is HTML
  5. Other code languages are used to add additional functionality: PHP, CSS and Scripts are the main ones, but there are lots of others and they all have to work with HTML.

Next time we’ll look at another term you’ll hear a lot of: FTP.

Next post:

Previous post:

What do you think?

Comments on this entry are closed.

  • Naomi Jane Jun 5, 2009 @ 17:13

    Good job…very informative for the learners…the other day my father was asking me similar questions to which u hve given a wonderful answer..thanx..

    • WealthyDragon Jun 5, 2009 @ 18:21

      Naomi, hi,

      You’re very welcome – glad it was helpful!

      If your father has any other questions leave a note here and I’ll try to answer them 🙂



  • Bummarketing Jun 9, 2009 @ 23:37

    I just stumbled upon this blog. I must say WealthyDragon you have made some good efforts to set it up. Keep up the good work and yes I liked this post about how websites work. I am going to bookmark your site and check it regularly for updates.