|
Lesson 4 � Building a Web Page
Get your ideas together
Right, we�ve created our first page and now we can think about a whole web site. Building a basic website is easy, once you�ve got an idea about what you want to do. The first step is to sit down and plan exactly what you want. You might be a great football fan and know loads about a particular team that others might find interesting. You might have a hobby that you want to share. Whatever it is, you need to draw up a list of what will be on your site.
If you put everything on a single page it will be very long and nobody will bother to read it. Web designers split things into smaller pages and use web links to join them together. The first page is called the "home page" and is the first page people will see when they arrive at your site. Your home page should tell people about the site, what sort of thngs they will find and perhaps who built it. The homepage should always be called "index.htm" as this is the file that the web server sends if no file name is included in the URL.
Getting started
Most experienced Web developers include extra HTML instructions that tell the browser how to disply their page as they go along. However for this first page we will add them later so you can see how they work. You can either use the example text, type something of your own. Remember to save it in your homepage directory and call it "index.htm"
Write some HTML
You turn a text file into a web page by adding HTML commands. These are the commands that a web browser uses to decide how to display the document. The first thing is to tell the browser that it is looking at a HTML document. You do this by putting <HTML> at the top of your file and </HTML> at the bottom.
<HTML>
This is all about Surrey United, my favourite football team.
I have been a supporter for three years and they play at a ground near my home so I can go and watch them
</HTML>
The title
Next you need to give your page a title. The title goes into the "header" part of the page. The header contains instructions to the browser that are not part of the main page. The Title goes immediately below the opening <HTML> line:
<HTML>
<HEAD>
<TITLE>Surrey United: The Greatest Football Team Ever
</TITLE>
</HEAD>
This is all about Surrey United, my favourite football team.
I have been a supporter for three years and they play at a ground near my home so I can go and watch them
</HTML>
There are other things that can go into the header and we will cover these later.
The Body
Now you have created the heading part of your file you can create the BODY � the things that you want to appear on screen. The body starts with a <BODY> tag (which goes after the </HEAD>) and finishes with </BODY> (which goes before the final </HTML>)
If you put them in, you now have:
<HTML>
<HEAD>
<TITLE>Surrey United: The Greatest Football Team Ever
</TITLE>
</HEAD>
<BODY>
This is all about Surrey United, my favourite football team.
I have been a supporter for three years and they play at a ground near my home so I can go and watch them
</BODY>
</HTML>
You can now try saving and displaying your document, since it has all the bits you need for the browser to make sense of it. However, although it will display it probably won�t look very good. This is because we haven�t told the browser anything about how we want the words displayed on screen. So it just uses the same font and same size. It doesn�t even put any line breaks in, even though we have one in the original.
The next lesson deals which how to make it look better.
|