HTML Terms and Concepts

Part II - Preparation

Part II - Writing the Code

Part IV - Exercises

HTML Lists

Lists are used all the time in web pages. In HTML, web developers use lists to group related items together. There are 3 types of lists in HTML, an ordered list, an unordered list and a description list.

<ol> - ordered list

Ordered List - Is a numbered list. 1, 2, 3… and so on.
  • Item 1
  • Item 2
  • Item 3

<li>

The <li> tag is used to separate items on the list. Here is an example of how to set up an ordered list using html:

<ol>
  <li>Item 1
  <li>Item 2
  <li>Item 3
</ol>

<ul> - unordered list

Unordered List - Is a list of items that aren’t numbered. By default, bullet points are used to separate items on the list.
  Item 1
  Item 2
  Item 3

<li>

Like with the ordered list, the <li> tag is used to separate items of the list. Here is an example:

<dl> - description list

Description List - Is a list of terms and their descriptions.
Item 1
 Description of Item 1
Item 2
 Description of Item 2
Item 3
 Description of Item 3

<dt>

Used to separate items of the list.

<dd>

Used to describe or define its respective item.

Example HTML Code:

<dl>
  <dt>Item 1</dt>
  <dd>Definition of Item 1</dd>
  <dt>Item 2</dt>
  <dd>Definition of Item 2</dd>
  <dt>Item 3</dt>
  <dd>Defintion of Item 3</dd>
</dl>


Next - HTML Concept: Navigation Bar