<< .. Go to : : Home : : Exercise 2 : : Demo 2A : : Demo 2B : : Demo 2C : : Demo 2D : : Demo 2E : : All Class Demos .. >>

Exercise 2 Tags Defined

A simple explanation of what each one does.

List Elements (Tags)

The most commonly used list is the unordered list. The three lists we will cover are the Unordered List, the Ordered List and the Definition List. The first two both use the list element as their nested component. The definition list has its own set of nested elements.

<ul> </ul>
UL is the unordered list - items that can appear in no particular order. Open the UL element and include all your list items. Then close the UL element. By default the bullet is a square, but you can change it to a disk or a circle. The unordered list must contain at least one list item.
<ol> </ol>
OL is the ordered list used for information that goes in a certain order. Step by step instructions, or they can be used like outlines (for English class). By default they use numbers, but you can use Roman numerals, cap or lower case letters.
<li> </li>
LI is the list item. Use this element inside either the ordered or unordered list elements.

<dl> </dl>
DL or definition list. This list was created to contain terms and their definitions. Open with the DL element, use the DT & DD elements and when you are done with all your terms and defnitions, close with the DL element.
<dt> </dt>
DT or definition term - the word or words to be defined
<dd> </dd>
DD or definition description. When you are through with all your definitions, then you close the definition list.

CSS Style Document Element

To use CSS in a document you need to contain it within actual HTML elements. For document styles, use the style tag inside the head of the document.

<style> </style>
The STYLE element tells the browser that you will be using some CSS in your document. Only use it in the head of your document. Do not confuse it with the style attribute - yes it is confusing.

CSS Inline Style Element

For inline styles, use the span element. You can use the span element to style a single letter or a larger volume of material. Use sparingly. If you can use an actual style created in the head of your document (Document Style CSS) that is better.

<span> </span>
The SPAN element tells the browser that you will be using some CSS in your document. Use it in the BODY of your document. Use the style attribute here to add your CSS. All the CSS styles go inside one set of quote marks. See the demo (2E) to view the graphic of this.

© Claudia Faulk. Created in 2008. Updated 1.10