<HTML TAGS>

REMEMBER - When writing HTML code it’s best to use a raw text editor like Notepad (Windows) or Simple Text (Mac) - REMEMBER

HTML stands for Hyper Text Mark-up Language and it is the computer language that most web pages are written in.

The way it works is that all content is contained within a series of tags which contain instructions on how the page is set out. Tags are contained within these triangular brackets < >, so to start an HTML page you would type in <html>.

The content the tag refers to then goes after the tag. At the end of the content the tag refers to you have to add an end-tag. The end tag is the same as the start tag except that you insert a forward slash after the opening bracket. In other words you would end an HTML page with </html>.

 


STARTING A PAGE

 

An HTML page is divided into two sections, the head and the body.

The head contains things you don't see in the browser window like title, meta tags, description, keywords and javascript; while the body contains all the stuff you do see like images and text, all nicely formatted with HTML tags.

If I was to type in:

<html>

<head>

<title>

GREETING

</title>

</head>

<body>Hello!</body>

</html>

I would have a very basic page called GREETING which just says Hello!

Click here to see, and press the back button in you Browser toolbar to return to this page.

 


SAVING A PAGE

 

The page should always be saved with the filename appended with .htm or .html

The homepage is always called index.htm or index.html

Also you should remember to never put any spaces in your file names. In other words if you want to call your page Saving a Page then you can make your file name savingapage.html, saving-a-page.html or saving_a_page.html, but NEVER Saving a Page.html

You can use hyphens or underscores to imply spaces but if you use actual spaces the browser wont find it. Also it's best to avoid capital letters - It doesn't usually cause a problem but it can do - and it is bad protocol if you believe most netheads!

Now you know all this type out the greeting page above, save it to disc (hard drive, floppy, zip disc etc), calling it index.html and view in a browser.

 


<!---- COMMENTS ---->

 

If you put an exclamation mark after the opening bracket it tells the browser that this is a comment and not a tag. This means you can put stuff there for your own benefit, such as a reminder where to start or finish a section of the webpage.

e.g. <!---- start navigation here ---->

This not only makes life a lot easier when you're starting out and you need to remind yourself which elements go where; but it's also extremely useful when you get to be a dab hand at writing HTML and you need to insert bookmarks into an extremely complicated piece of page source.

Try typing <!---- I am a magician ----> into the body section of your page source, so you now have:

<html>

<head>

<title>GREETING</title>

</head>

<body>

<!---- I am a magician ---->

Hello!

</body>

</html>

Go File/Save, click the refresh button in your browser and, lo and behold, magically, nothing new happens!

They don’t normally tell you about comments when you're learning HTML, but the code can be a nightmare to get your head round. One thing typed wrong can mess everything up so it’s useful to have the odd pointer as to where you are on a page.


ON LINE JONES

home         CONTINUE TO FORMATTING

Hosted by www.Geocities.ws

1