Section banner
Getting Started


In your text editor, write the following text to create a very basic web page. Type the tags such as <title> exactly (they are not case sensitive) and change the text between the tags if you wish.

<HTML>
<HEAD>
<TITLE>A Basic Web Page</TITLE>
</HEAD>
<BODY>

<H1>This is my first web page</H1>
I am learning HTML and I like it. <br>
I can format text to be <b>bold text</b> or just plain text again.
</BODY>
</HTML>

Understanding The Tags

The <HTML> tag is, lets say, is a must. It tells the browser to expect a HTML document, a web page. And the </HTML> tag shows the end of the HTML document - so these tags should go at the very start and end of your page.

The <HEAD> and </HEAD>tags are about the page's "header" information (such as the title to display at the top of the screen), and the <BODY> and </BODY> tags mark out where the "body proper" or the "main text" of the page starts and finishes.

The <TITLE> tag specifies the document's title. The corresponding </TITLE> tag tells the browser that the title has ended.

The <H1> tag was used in the example. There are many ways to make a "headline" for your page, and you can decide to make your headline (if you want to use a headline that is) big, medium or small. The <H1> tells the browser "use a size one headline". the </H1> tag switches off the <H1> headline. To get a size 2 headline use <h2>. You can go all the way down to a </H6> headline, which is the smallest.

The <B> tag makes text after it go bold. And the </B> tag turns off the bold effect.

Save your file as mypage.html or something ending with .html or .htm. The .html and .htm file extensions tell the browser that this document is an HTML file.
In fact at Celticweb, your default web page should be called index.html.
This allows you to just enter a URL such as http://www.celticweb.com/ and the index.html page is automatically served. In other words, you do not have to enter the URL http://www.celticweb.com/index.html
However if the page is called mypage.html, you must enter the full URL http://www.celticweb.com/mypage.htl to call up the page.

Note: A web site's address is known as a URL. URL means Uniform Resource Locator.

What is a URL? It is a way of pointing to a file in a directory, but that file and that directory can exist on any machine on a specified network and can be served via any of several different methods or protocols. URLs do not only point to something as simple as a file: URLs can also point to queries, documents stored deep within databases, the results of a finger or archie command, etc.
Basically if it's out there, we can point at it.

Open this file in your browser and it will look like this:

This is my first web page

I am learning HTML and I like it.
I can format text to be bold text or just plain text again.
Each time you make changes and save the document in the editor, go back to the browser and hit the REFRESH or RELOAD button to see the changes take effect.

You can add attributes to the <body> tag, (be careful about where the spaces occur:

<body bgcolor=black text=white>

This makes the page background color black, and all the text white. Or you could have tried something a bit more radical such as

<body bgcolor=yellow text=red>

Colors can be specified using color names ("red", "white", "black") or color numbers based on the hexidecimal system.

In the hexidecimal system colors are specified by a six digit number ranging from "#000000" which is the hex number for black to "#FFFFFF" which is the hex number for white.
Notice that black, "#000000" is specifying zero color, which is exactly what black is. And white is made up of all the colors of the light spectrum and so gets the highest possible value in this system, "#FFFFFF". The color of the text on this page is "#003333" and the color of the background is "#C8C898". There are numerous combinations in this hex system. You should experiment!

Carriage returns in raw text do no show up in a web browser. We have to indicate a carriage returns with another tag. We have to insert a <p> tag. Unlike all the tags mentioned so far, it doesn't always need a closing tag </p> - this can often be omitted.

So HTML only recognises a new line when you make it explicit - by using the <p> tag for a new paragraph (two lines down), or its close cousin the <br> tag (which gives one line break). It doesn't need a closing tag either - nor does <hr> (which creates a horizontal rule - a nice line across your page).

These are among the few exceptions though. Most tags have to have closing tags.

Links

The idea of HTML is to to use hypertext to travel from one document to another. It was originally developed for bibliographies in on-line scientific papers. Instead of going looking for the paper's references, one could just click on the reference and immediately go to the full text of the reference. This link to another page is called a hyperlink. To create a hyperlink type the following in the body of your saved file:

Click here for our <A HREF="http://www.celticweb.com"> home page </a> now.

When you look at this code in your browser, you will see:

Click here for our home page now.

Whatever text you put between the tags (e.g. home page) is highlighted by the browser as a hyperlink. The first tag contains the actual web address (or URL) - another site perhaps, or another one of your own pages - that the user will be transported to once they click on it.

The pair of tags used for hyperlinks is known as an anchor.
The anchor starts with <A . (There's a space after the A)

Then you specify the address of the document you want to link to by typing HREF= (which stands for "hypertext reference") and the address in quotes

This is followed by a closing right angle bracket - the >
Insert the text you want to appear as hilighted or clickable.
Finally you tell the browser where the clickable link ends, by adding the ending anchor tag: </A>

Try altering the link - it can be to any other address or page on the web, but obviously any external link won't work until you go online.


| Introduction | Getting Started | Images | Counters | Special Characters | Lists | Tags |
| Meta Tags | A Checklist | Unwritten Rules | Software |



Celticweb Internet Services
Copyright 2000 Celticweb. All Rights Reserved