return to InterLink front page

background information
projects
cool stuff

geek zone einstein
"Imagination is more important than knowledge.
Knowledge is limited. Imagination encircles the world."
Albert Einstein



How to create web pages





When I'm creating web pages I find it's best to have your WWW browser (eg Netscape) open at the same time as your editor program (the document where you write your HTML page). This way you can see your page as you create it and you can update it really easily.

To view a local (ie. on your computer) file through Netscape, go to the FILE menu and select OPEN FILE. Then select the file name of the document you've been working on, and voilá! there's your page. As you keep working on it, you can save your document at any time, then select the RELOAD button in Netscape to see your changes.

Now you've got that in your heads, on with the lesson! ...

top of the page

What are HTML tags?

When a WWW browser displays a page on the Web, it reads from a text file, and looks for special codes or "tags" that are marked by the < and > signs. The general format for a HTML tag is:

<tagname>blah blah blah</tagname>

As an example, <h3>text here</h3>, the <h3> tag is what makes the words "text here" big and bold.

HTML tags are used to tell a browser to bold the text, italicise it, make it into a header, or have it be a link to another document. It's important to remember that the ending tag, </tagname>, contains the "/" backslash character. This "/" backslash tells a WWW browser to stop tagging the text. Many HTML tags are paired this way. If you forget the backslash, a WWW browser will continue the tag for the rest of the text in your document, which can be really confusing!

OK, that out of the way... on to:

top of the page

Creating your HTML Document

The very first thing you need to do is to tell the browser that this is a web page. So the first tag on the page is <html> and the last one on the page is </html>, and everything else you type is between these tags.

The next thing to do is to tell the browser the title of the page, which is the name that appears at the top of the browser window in the title bar. It's NOT your main header on your web page - you won't see it on your page at all..... look up to the very top of your screen to see it! For this exercise, you're going to be creating your own home page, so try something like this ... give the page a title, then type a bit of text.

<title>Mildred's Page</title>

This is Mildred's homepage. Here you will find out about what makes Mildred tick. What she thinks about food and animals, and some cool places she goes to on the internet.

Now save your file. Because it's an HTML document and it will be picked up by WWW browsers, you need to name it like this :

mildred.html if you are using a Mac
or, if you're using a PC, save it as mildred.htm

Check out your page now by opening into Netscape. You'll notice that it's pretty boring really, no colours, no spaces, no pictures. We'll change all that soon.

Return to your file. Under the text you typed before, press return a few times, then type some more text.

Save your file again and reload it into the browser. What happened?

By now you will have realised that the browser hasn't recognised the formatting you did when you were typing before - there are still no spaces.

top of the page

Modifying your HTML Document

Paragraphs and Line Breaks

The tag for creating a paragraph break is: <p>
You don't need an ending </p> for this tag, you just put it into your text wherever you want a paragraph break.

If you just want a return with no space, use this tag: <br>
You don't need an end tag for this one either.

There is one more kind of break, this one creates a line across the page: <hr>
You don't need an end tag for this one either. But you can change its length and thickness like this:

<hr width="50%">
this will make the line 50% of the page width

or <hr size=6>
this will make the line thicker

Try these, saving and reloading to view your document.



Headings

There are six levels of basic heading tags,

<h1>

is the biggest, and
<h6>
is the smallest. There are other ways of doing headings too, using colours or font size tags. But first, try making headings like this:

<h2>Mildred's Life</h2>
<h4>Mildred's Cat - Miranda</h4> and so on ...



Fonts

Fonts come in 7 sizes on the Web. The default size is 3 and you can go up and down from there!

The tag you use is:

<font size=5>This is size 5 font</font> <font size=2>This is size 2 font</font>

because the default is <font size=3>, you don't need to tell it to be this size. I have made all the text on this page <font size=4>.

I use this most often to create different kinds of headings like this:

<font size=6>T</font><font size=4>HIS IS</font>
<font size=6>M</font><font size=4>ULTISIZING!</font>

THIS IS MULTISIZING!

You can also define text size using the <font size=+3> tag. A <font size=+1> tag tells the font to be one size larger than the default size, a <font size=+2>, tag tells the font to be two sizes larger than the default size, and so on. You can also use <font size=-1> to make the font smaller than the default.

<font size=1> = <font size=-2>
<font size=2> = <font size=-1>
<font size=3> (default) = <font size=1> (default)
<font size=4> = <font size=+1>
<font size=5> = <font size=+2>
<font size=6> = <font size=+3>
<font size=7> = <font size=+4>



Style

There are some other basic tags for changing the style of text, there's

<b>bold</b>
<i>italics</i>
<tt>typewriter style</tt>

you can mix these tags around too.

top of the page

Lists Lists Lists

There are a few different kinds of lists, they're useful for laying things out on the page.


1. Unordered

Unordered lists show up with bullet points in front of each line. The HTML code is:

<ul>
<li>item one
<li>item two
<li>item three
</ul>

and it will look like this:



2. Ordered

An ordered list will put numbers in front of the lines. The HTML code is:

<ol>
<li>item one
<li>item two
<li>item three
</ol>

and it will look like this:

  1. item one
  2. item two
  3. item three



3. Indented

This is one of the few ways to get text to indent on web pages:

<dl>
<dt>A 'dt' tag will run the text against the margin
<dd>But a 'dd' tag will indent the text
<dt>You can mix
<dd>and match them
</dl>

and it will look like this:

A 'dt' tag will run the text against the margin
But a 'dd' tag will indent the text
You can mix
and match them

you can mix up the lists too, and have lists within lists, have a play!

top of the page

Graphics

There are two main formats for graphics on web pages, .gif and .jpg

There are also a few things to keep in mind when you're designing pages with graphics.

Large images and lots of images may look great on a high-end computer, but they will frustrate users who must wait for the images to be downloaded over a network. A single image can be displayed several times, and once it's loaded in the first time it's in the memory and will download much more quickly.

The basic HTML for a graphic is

<img src="picture.gif">

It's a good idea to add the width and height of the image, as it allows the page to load into the browser faster because the browser knows how much room to leave for the picture.

<img src="picture.gif" width="25" height="20">


There are some extra things you can also do to change the way the picture works with the text.

This tag will align the picture to the left, and run the text along the right of the picture:

<img src="picture.gif" width="25" height="20" align=left>

This tag will align the picture to the right, and run the text along the left of the picture:
<img src="picture.gif" width="25" height="20" align=right>

This tag will align the picture to the left, and run the first line of text along beside the centre of the picture, then wrap around underneath:
<img src="picture.gif" width="25" height="20" align=middle>

This tag will align the picture to the left, and run the first line of text along beside the top of the picture, then wrap around underneath:
<img src="picture.gif" width="25" height="20" align=top>

This tag will align the picture to the left, and run the first line of text along beside the bottom of the picture, then wrap around underneath:
<img src="picture.gif" width="25" height="20" align=bottom>

One more thing, to make loading the page faster, and to help those who browse with their images off, it pays to add the "alt" command inside the image tag, that tells you what the image is. For example:
<img src="picture.gif" width="25" height="20" alt="mildred's cat">

top of the page

Anchors & Links

Links to Local Files

Firstly, create a second page, or copy one from someone else so that you have a file with a different name.

The simplest anchor is one that opens another HTML file in the same directory or folder as the presently displayed WWW page. The code for this is :

<a href="destination.html"> link to next page</a>

This will show up in your page as a link, in a different colour and usually underlined.

link to next page

when you click on it, you'll go to the page called "nextpage.html"

If the page you want to link to is in a different directory, you can still direct the browser to find it:

<a href="places/nextpage.html"> link to next page</a>

will find the file 'nextpage.html' in the folder/directory called 'places'

If the page is back one directory, use the ../ command:

<a href="../nextpage.html"> link to next page</a>



Links to The Internet

Next, the part you've all been waiting for, linking to the outside world.

It's pretty much the same as for local files, except you use the web address of the page you'll be linking to.

<a href="http://www.interlink.org.nz/index.html">InterLink</a>

The most important thing to remember is the quotation marks on either side of the page address.
top of the page

AN ASIDE......

What is a URL?

The Uniform Resource Locator is what the WWW uses to find the location of files from computers on the Internet.

The "http" stands for HyperText Transfer Protocol, it's the part that tells the browser to look for a web page.

The "www.interlink.org.nz" is the domain name of the address. It gives the browser directions to the server where the pages are held.

The "/index.html" gives directions to the particular file.

Now have a practice making links from your homepage to some of the other sites you've found.

You can make your links for any text in your page, or you can make links around pictures, just the same way as you do around text. Like this:

<a href="http://www.interlink.org/index.html"><img src="picture.gif"></a>

A linked picture has a blue border around it by default. If you want to take the border off, use:

<a href="http://www.interlink.org/index.html"><img src="picture.gif" border=0></a>

You can also make the border thicker by increasing the number following the border= command.



Links within your page

If you have a long document, it's a good idea to break it up into sections, and link to the sections down the page from pointers at the top, like at the top of this document.

To tell the browser to link within a document, the tag is a bit different:

<a href="#nextpart"> link to next part</a>

but the part down the page that you're linking to has to be named, like this:

<a name="nextpart"> the first line of the target text</a>

top of the page

Extras

Colours

The entire web page document that you're working on can be manipulated further using a <body> tag. This tag comes straight after the <html> tag at the beginning of the document, and from within it you can control the colour of the page, the text and the links - both before (LINK) and after you've visited them (VLINK).

It's a good thing to do, because the default colours are grey, black and blue.

The colours are depicted by six figure codes (called a Hex), they go from WHITE ffffff to BLACK 000000. There are all sorts of crazy formulae for working out the colours between white and black, but personally I use a programme called HTML Color Picker which makes life a lot easier.

So, to have a page with a white background, green text, red links and blue visited links, it goes like this:

<BODY BGCOLOR="#ffffff" TEXT="#2D9E3C" LINK="#C32121" VLINK="#3D3BA8">

It may seem strange, but it does work! just remember that Americans (who wrote the language), spell "color" without a "u", and "center" with an "er"



Images

You can have an image as the background for your page too. This also goes into the <body> tag:

<body background="picture.gif">



Centered text

To center text, put <center> and </center> tags around the part you want centered.



Formatting using tables

There's so much to learn about tables, I though I'd start a new page.........



Conclusion

The information on this page should certainly help to get you started. There's heaps more to learn about HTML and about designing web pages - we've only really scratched the surface. If you want to know more, there's heaps more info on the web - and a great place to start is The WebMastery home page - a great set of links to places where you can learn how to create your own web sites..... HTML, graphics, even resources for kids - it's all here. Check it out!


top back