mirrormere.com News
Demystifying HTML, by Christopher Hurley

Fundamentals
Formatting
Finishing Off

Demystifying HTML - Part Three

Please note: If you put multiple spaces in your text, they will not show. Use the   special character to make a non-breaking space. One space WILL show up - don't use   for all your spaces. For instance, if you want to put two spaces between the words 'Yes' and 'we do!', you need to use the code:

Yes  we do!

Remember that one space will appear, so you can use one space and one   character. Don't add a space after   unless you want three spaces in between the words.

If you're using more than one tag to format text - making it bold and italic, for instance, the tags must be closed in reverse order to the way they were opened. This is called nesting tags. If I want to make the text 'I want to be a superstar!' both italic and bold, I'd need to use the code:

<strong><em>I want to be a superstar!</em></strong>

It isn't good HTML to close the tags in the wrong order, like this:

<strong><em>I want to be a superstar!</strong></em>

Although most recent browsers are normally forgiving about this sort of thing and will display the text the way you wanted it, older browsers may not work the same way and display your page entirely differently. Always keep to HTML rules to be sure that your page will work properly in all the browsers people could be using.

One last tag you might want to use is <hr>. This tag can have a few other attributes, but it basically creates a horisontal line on the page. If you scroll down to the very bottom of this page you'll see one just before the copyright notice, although this may be coloured blue and could be rather thin depending on the browser you have - if you use <hr> with no attributes you will normally get a thicker grey line. <hr> is not a paired tag and thus doesn't need a terminator.

When you have finished entering your text, your page could look something like this example:

<html>
<head>
<title>All About Me</title>
</head>
<body>
<p align="center">Hi! I'm <b>James Smith</b>, and my interests are:<br>
<font face="Arial"><em>Computing, writing poems and eating pizza.</em></font></p>
<p align="center"><u>Nice meeting you!</u></p>
<body>
</html>

What would this look like?

The next thing you probably want are some links to other pages or other sites. These are done with the <a href="address"> tag. Use the tag like this if it is linking to another page on your site in the same directory/folder:
<a href="otherpage.htm"> My Link </a>
or if it links to another place on the Internet, use
<a href="http://www.somewhere.com"> My Link </a>
Remember that the <a> tag is a paired tag again and requires a terminator. The text inside the tags becomes the text you can click on to go to that page or site. You can format the text inside the <a> and </a> tags with any other tags as normal - use <p>, <strong>, <em> or any other tags you care to think of. However, a link within a link could prove disasterous...

An Internet address is technically called an URL. This stands for Uniform Resource Locator - you'll often find an Internet address called this, especially amongst Web designers. I normally try to stick to 'Internet address' or just 'address' in my tutorials, but if I suddenly write URL then at least you'll know what I'm talking about.

See another example

Make sure that your file ends in </body> and </html>. Save it with the extension of .htm or .html (or with a different extension, but make sure that you rename the extension to either of these). Type in the path to the file into your browser's address box, and view your page in all it's glory!

If you are beginning with HTML, I recommend you read some of the other tutorials available here at mirrormere.com. Alternatively, you can click on the links at the top of this page to recap on some of the other

T3 Network Affiliate
mirrormere.com Network
mirrormere.com
  News
  Authoring
HTML
Design
Style Sheets
JS
  Reviews
HTML Dev
Graphics
Misc

mirrormere
Interactive
  Web Design

Frevo
  Home
  Software
  Reviews

Home

Search

Forums

Chat

Contact

Top Best viewed with Microsoft Internet Explorer 5 Leaving mirrormere.com, at 800x600 or higher.
© 1999-2000 mirrormere Interactive. Legal Notice.
mirrormere.com and mirrormere Interactive are trademarks of mirrormere Interactive.