Basics :Lesson 3

This is the last lesson of Basics. In this lesson we shall learn how to create lists. There are three kinds of lists.

  1. Ordered List
  2. Un-ordered List
  3. Definition List
The above list is an ordered list. Items listed in ordered list are numbered 1,2,3,.... or a,b,c,..... Un-ordered list doesn't have numbers or alphabets. Instead they use bullets like dot, square etc. Definition list is used if you want to define a word, phrase, or any thing.

Lets have an example and you will learn how to create them.

First of all the output of the page.

Some Simple Lists

Products

  • Widgets
  • Knick Knacks
  • Beatles
    1. John
    2. Paul
    3. George
    4. Ringo

Deadlines

  1. Place orders before 4PM
  2. Order by midnight for next New Year

A Definition List

Widget
Provided in 3 sizes a widget is one of the most useful gadgets to discuss when one has nothing to say. So let's give a warm hand to the versatile widget. Where would be without them. Where is your widget today?
Knick Knacks
Comes in 1 size only! Similar to widgets, they have earned wide spread praise for their ubiquitous use the world over. As we all know one person's knick knacks are another person's prized possession. Even embedded in our musical heritage. "Knick knack, knick knack, give the dog a bone". Knick knacks, another product for the ages.

Now, lets see the code for the above output.

<h2> Some Simple Lists </h2>
<h3>Products</h3>
<ul>
  <li>Widgets</li>
  <li>Knick Knacks</li>
  <li>Beatles</li>
	<ol>
	  <li>John</li>
	  <li>Paul</li>
	  <li>George</li>
	  <li>Ringo</li>
	</ol>
</ul>
<h3>Deadlines</h3>
<ol>
  <li>Place orders before 4PM</li>
  <li>Order by midnight for next New Year</li>
</ol>

<h3>A Definition List</h3>
<dl>
  <dt>Widget</dt>
  <dd>Provided in 3 sizes a widget is one
        of the most useful gadgets to discuss when
        one has nothing to say. So let's give a warm
        hand to the versatile widget. Where would be without them.
	Where is your widget today?</dd>
  <dt>Knick Knacks</dt>
  <dd>Comes in 1 size only! Similar to widgets, they
	have earned wide spread praise for their
        ubiquitous use the world over. As we all know
        one person's knick knacks are another person's
        prized possession. Even embedded in our musical heritage.
        "Knick knack, knick knack, give the dog a bone". Knick 
	knacks, another product for the ages.</dd>
</dl>

Basics  1  2  3  4  prev  next