Basic orientation

What is a web page?

At heart, a web page is a simple document containing plain text. When we open a page, codes within the text of the document tell our computer how to display the page. For every web page there is a document containing text mixed with codes and we often call this document the HTML file or the source code for the page.

There is nothing magic about the text which makes up the source code, it is just plain text. In fact it would be perfectly possible to write out a web page using a typewriter or even a quill pen. It wouldn't actually do much, but if the text were then typed into a plain text document on another computer, the document could be opened in a web browser and viewed and would look exactly the same as the original.

Here's an entire complete web page:


<html>
<head>
<title>My first web page</title>
</head>
<body>
<p>
Hello world!
</p>
</body>
</html>

The text we want to show on the page (in this case, "Hello world!"), and the codes which enfold it, are both written in plain text. The difference between the text which is seen on the screen and the text which makes up the codes is just that one is separated from the other by angle brackets.

If our computer reads a web page and comes to an open-bracket "<" it knows that what follows is an instruction for the computer to deal with, so it gets on with it; then when it comes to a closing bracket ">" it knows that the instruction has ended and that what follows is the business of people and not computers and should be displayed on screen or read aloud or conveyed to the us in whatever manner we choose to have it.

All the amazing variety on the web, the millions of pages and sites and designs, is based on just this mix of text and code. Of course most pages have more in them than the example above, but it all comes down to the same basic principle.

Web pages are connected

What makes the web special and powerful is that one thing can be connected with another (and another and another and another). A page can be connected to another page or a thousand other pages, and one part of a page can be connected to another part of the same page. Connecting pages together and within themselves is what makes a page a web page. A page which isn't connected is just a page—there's no "web" about it.

These connections are usually called links (there goes one now!) and working with links is a crucial part of creating web pages.

Often, the code tells the computer to include another document at that point, such as a picture. In this case the code says in effect "now show this picture" and then gives an address for where the computer can find it. Most web pages are built up using text and pictures, sometimes even from different places on the internet. The page is only assembled when the visitor calls the page, and this all happens in the short time it takes the page to load into the browser.