Login for Software or Support

CoffeeCup - HTML Editor, Flash & Web Design Software

Over 48,871,524 Downloads in 87 Countries

Tell a Friend About Our Cool Software

Buy the Book Here !

Chapter 2: Tags versus Content


Any HTML document is made up of two things--tags and content. This is central to the way HTML works.
Tags are the HTML itself--in other words, the markup (remember HyperText Markup Language). All HTML tags are enclosed in angle brackets < and >. Here are some actual HTML tags:

<title>
<p>
<img>
<table>


Most but not all HTML tags are used in pairs--there is a starting tag and an ending tag. These tags are called container tags because they can 'contain' or wrap around other tags and content. The ending tag is the same as the starting tag with the addition of a leading slash (/). So, </title> is the ending tag for <title>. The tags that do not have a separate closing tag are known as 'self-closing'. All you do is add a space and the slash just before the > to close the tag. The <img> tag is a good example of this. Since it doesn't have a closing tag, we close it as follows:

Wrong: >img src="logo.gif">

Correct: <img src="logo.gif" />

Content in an HTML document is anything that is not an HTML tag. Another way of looking at it would be that content is the information you want to show the user. Content can be included in an HTML document in two ways:

  • Included as part of the document. This is the way text content is handled.
  • In a separate file and referenced from the document. This is the way images are handled.
Here's an example of HTML that illustrates how tags and content relate to each other:

<p>HTML is <b>easy to learn!</b></p>
Let's dissect and analyze this short piece of HTML:

  • <p> is the paragraph tag. It marks the start of a paragraph.
  • 'HTML is' is content. It will be displayed to the user.
  • <b> is the boldface tag. It marks the start of boldfaced text.
  • 'easy to learn!' is more content. It will be displayed to the user in boldface text.
  • </b> is the boldface ending tag. It turns boldface off.
  • </p> is the paragraph ending tag. It marks the end of the paragraph.
The relationships between tags and content will become clearer as you learn more about HTML.


Table of Contents
Download Our Software:

... and don't forget about our Free Software

CoffeeCup Home Page | Software | Copyright & Legal | Site Map | © 1996 - 2008 CoffeeCup Software, Inc.