Site hosted by Angelfire.com: Build your free website today!

.

.

Introduction Requirements HTML Tags HTML Document Structure Viewing HTML Source Code

HTML Tags

As I said before a HTML document is made up of tags. These tags tell the web browser how to display your webpage.

HTML tags normally come in pairs and are surronded by <>. These pairs are in the form

<tag>... </tag>

where the <tag> indicates the beginning of a tag-pair, and the </tag> indicates the end. HTML tags are not case sensitive, <b> means the same as <B>. For consistency you should choose one format and stick to it throughout your code.

Any content within a tag pair has the rules of that tag applied to it. The <b> tag is the bold face tag. All text within the <b> and </b> will be bolded

Example:

Lets look at the webpage created using the following HTML!

Don't worry about the other tags for the moment we are just concerend with the bold <b> tag. Cut and paste (Ctrl C + Ctrl V) the HTML code below into the form window and press the check it out button to see the resulting webpage.

<html>
<head>
<title>How to bold text</title>

</head>
<body>
This is a sample of how to <b>bold</b> text
</body>
</html>

Notice how the text between the <b> and </b> tags is displayed in bold.

Balancing Tags

Tags should always be balanced. For every <tag> you should have a closing </tag>. There are some exceptions to this rule. Some tags, do not have closing tag. These are known as empty tags. Don't worry about this for the moment, I will let you know which tags do not have closing tags as we go along.

Look at the diagram below can you see why the tags on the right are incorrect? Yes, that's it, tag2 is closed before tag1.

This may seem difficult at the moment but all you have to remember is that normally all tags have a closing tag and if you want to have a specific effect on text you should put it in between the relevant tag pair.

HTML RequirementsHTML RequirementsHTML Document StructureHTML Document Structure

 

 

HTML OverviewHTML RequirementsHTML TagsHTML Document StructureViewing HTML Source CodeHTML Heading TagHTML Paragraph TagHTML Line Break TagHTML Comment TagHTML Horizontal Rule TagHTML Block Quote TagsHTML Font Size AttributeHTML Font Colour TagHTML Font Type TagHTML Teletype TagHTML Alignment TagHTML Ordered ListsHTML Unordered ListsHTML Definition ListsHTML Anchored Link TagsHTML Mailto Link TagsHTML Image TagsLets create a webpageTake the HTML QuizHTML Quick Reference GuidePublishing your Website