Tags - define what things mean

Headings

Tags for headings are of the style <hn> where n is replaced by a numeral between 1 and 6.

All of our pages use heading tags to identify different parts of the page

The title of each class page is a Heading 1

and the subtitle of each page is a Heading 2

while page subheadings are Heading 3

The tags tell the browser to display the text between the opening tags <h1, h2, or h3 respectively> and the closing tags </h1, /h2, or /h3 respectively> in the manner that the particular browser chooses to display a Heading 1, a Heading 2, or a Heading 3

[top]

Lists

The basic list in HTML is the unordered list. The following shows the usage of list tags.

<ul> - the start tag

  • <li> - the tag for each item in the list, followed by the end tag </li>
  • <li> - another list item </li>
  • <li> - yet another </li>

</ul> - the end tag

  1. Ordered lists are the same except "ul" (unordered) is replaced with "ol" (ordered).
    • Lists can be nested within lists.
  2. As that one was.

[top]

Paragraph and line breaks

<p> - the tag for paragraph enters more vertical space than line breaks. Remember to end a <p> with a </p>.

<br /> - the tag for line breaks
returns to the following line and resumes there.
There's more to ending the break tag, however.
Read on.

[top]

Empty elements

For example, horizontal rules are created using the <hr> tag. The horizontal rule is is an empty element because it provides a simple directive and has no content. Since an empty element does not require an end tag, but the XHTML standard requires one, the convention for empty element tags is to follow the tag with a blank space and a slash to indicate that the tag both opens and closes this element.

Accordingly, the correct horizontal rule tag would read <hr />.



The same is true for other empty elements

  • <area />
  • <base />
  • <basefont />
  • <br />
  • <col />
  • <frame />
  • <img />
  • <input />
  • <isindex />
  • <link />
  • <meta />
  • <param />

[top]


theory | TAGS | links |