[IMAGE] IU SLIS logo

Demo page logo

Paired and Unpaired Tags

The purpose of this page is to demonstrate some of the features of html that you should be using in your work.

The following tables will help you move around this page (which is quite long). Clicking on any cell in the first table will take you to that section of the page. Click on any cell in the second table will take you to an explanation of that tag.

There is a link <Return to top> which will return you to these tables.

Major sections
What is HTML? How HTML works Unpaired tags Paired tags Examples UNIX help

HTML Tags
unpaired tags <doctype> <br> <hr> <basefont*> <meta>
paired tags <html> <head> <title> <body> <p>
<h#> <address> <nobr> <center*> <blockquote>
<pre> <font*> <b> <i> <big>
<small> <strike*> <sub> <sup> <tt>
<samp> <u*> <cite> <code> <em>
<lists> <div> <strong>




How HTML works

Basic markup involves the use of a set of tags, which can be described intwo ways.

Tags can be modified with attributes which have values. Before looking at some of these tags, a word or two about attributes; these are elements of HTML that allow you to have more control over the way your pages look. For example, instead of simply placing a horizontal rule <hr> on the page and letting it take the default value, you can specify its length and alignment using attributes with different values.

The generic form of an attribute is:

<html_tag attribute="value">

So, in the example mentioned above, to instruct the browser to display a horizontal line that will extend across three-quarters of the page from the left margin, you would use:

<hr width="75%" align="left">

As we go through some of the common forms of HTML markup, you will notice that many tags have sets of attributes that you can use.

As you get better at marking up documents, you'll begin to experiment with nesting tags. This means that you can instruct a browser to display an element of your page with multiple effects. For example, you can make a phrase

larger and bold

or

smaller and italicized.

What you must remember is that you should end your nested tags in the exact reverse order as you started them. The markup for the first example above would then look like this:

<font size="5"><b>larger and bold</b></font>

You can include comments within your html markup that will not be displayed by the browser. You can use this tag to place information about the document (or you) that only will be visible to people who view your source markup. It is also possible to include commands that instruct servers that access your page to perform different functions (which is beyond what we will do here).

The comment tag uses an opening markup of <!-- and a closing of -->. There must be one space after the second - of the opening markup and one space before the closing -. The comment is the text that appears in between the markup. Here's an example of a comment used in these demonstration pages:

<!-- These pages are intended to help you learn HTML markup -->

Return to top

Some common markup tags (unpaired and paired)

Some of the common tags are:

Unpaired, which appear alone in your markup. These include:

Return to top

Return to top

Return to top

Return to top

Return to top

Paired, which always must be opened and closed:

There are four paired tags which should always appear in your web documents.

Return to top

Return to top

Return to top

Return to top

Here are some other paired tags that you can use:

Return to top

Return to top

Return to top

Return to top

Return to top

Return to top

Return to top

Return to top

Return to top

Return to top

Return to top

Return to top

Want to know more? Here are links to other pages about HTML.

Use the Back button to return to this page when you are ready to continue.


Demo Page
Navigation:
DemoPage contents About html UNIX help HTML tags Lists Links Images
Imagemapping Tables Forms Frames Javascript CSS (style sheets) XML


Page by Howard Rosenbaum
Find me at [email protected] http://www.slis.indiana.edu/hrosenba/www/Demo/Demo.html