HTML 4 by stevethepro

 LESSON 1 - Making a web page

What is HTML?

HTML stands for HyperText Markup Language. The term ‘Markup’ means HTML is NOT a programming language. This is very good news because it's way, way easier than learning programming, so easy in fact we're going to have your first web page done in about 10 minutes.

What is a web page?

A web page is simply a text file with some HTML code written inside AND who’s filename ends in either .htm or .html eg. myfile.htm.

What is a text file?

A text file is a very simple document that can be produced with Windows Notepad. Most word processors can also be used providing you choose: save as a text file. Text files often have a file name extention (the bit after the dot) as txt - myfile.txt.

So to do the exercises here you'll need to pick a program to work in. I like Notepad if you have Windows coz it’s simple. (Usually found under ‘Accessories’).

1

HTML is made up of code in pointed brackets. These are called ‘tags’. The first tag we will learn is the HTML tag. This tag starts each page and ends it telling the computer that between the two tags is HTML code.

So open Notepad or your word processor and write an opening and closing HTML tag into your page. Note that the end ending tag has a forward slash / before the letters HTML. This forward slash is in all closing tags in HTML.

<html>
 
</html>

1

Each web page has two distinct sections, the head section at the top and body section below.

The body section is where everything you can see on the page is such as text, pictures, links etc.

The head section is for other stuff such as key words for search engines. We'll learn about the head section later.

Meanwhile here are the tags for head and body sections. Easy to remember as you can see:

<html>
 
  <head>
 
  </head>
 
  <body>
 
  </body>
 
</html>

1

Now all we have to do is bung some text into your web page. Make sure you put the text between the body tags - in the body section of the document.

Save your file giving it the extention (the bit after the dot) htm or html: myfile.htm

Now the moment of truth. You want to see your new web page as it will be displayed on the web. Find the new file you've created and open it in your web browser (that's Internet Explorer or Netscape most probably). You may just have to double click it, or drag it on to the browser window. And that should be it, your first web page. Told you it was easy.

<html>
 
  <head>
 
  </head>
 
  <body>

My name is steve the pro. Here is something interesting you won't hear in the news.
 
  </body>
 
</html>

Should I use capitals only?

No, it doesn’t matter if you caps or lower case for HTML code. But it makes neater and clearer if you stick to some kind of system.

Also it doesn't matter how much space is in between your code. You can put code on different lines or right next to the text if you want - whatever seems neater.

You’ve done all it wrong!

What you’ve just done should display in you’re browser window but technically it’s wrong. Try putting a load of text in there and then see what happens. You’ll find that no matter how hard you try all the text comes out in one big chunk - no paragraphs, no more than one space between each word. In addition it’s not proper like. Technically everything on an HTML page should appear in an element.

What’s an element? How can you sort your text into paragraphs? These questions and more will be answered in the next thrilling episode of “Stevethe Pro teaches HTML 4”.

Meanwhile let’s recap...

HTML man

next