HTML | Tags | Lists

html list

There are many reasons you might want to add a list to your pages.You can create three types of lists in XHTML:

  • Unordered lists ,which are like lists of bullet points
  • Ordered lists ,which use a sequence of numbers or letters instead  of bullet points
  • Definition lists ,which allow you to specify a term and its definition

List within the <ul> element (which stands for unordered list).Each bullet point or line you want to write should then be contained between opening <li> tags and closing </li> tags (the li stands for list item ).

<li> This is First Point</li>
<li> This Second Point</li>

In an ordered list, rather than prefixing each point with a bullet point, you can use either numbers (1, 2, 3), letters (A, B, C), or Roman numerals (i, ii, iii) to prefix the list item. An ordered list is contained inside the <ol> element. Each item in the list should then be nested inside the <ol>element and contained between opening <li> and closing </li> tags.

<li> This is First Section</li>
<li> This is Second Section</li>

Values for ordered List:

1     Arabic  numerals
A     Capital  letters
a     Small  letters
I     Large  Roman  numerals
i     Small  Roman  numerals

If you want to specify the number that a numbered list should start at, you can use the start attribute on the <ol> element. The value of this attribute should be the numeric representation of that point in the list.

<ol type=”A” start=”2″>
<li> This is First Show</li>
<li> This is Second Show</li>

The definition list is a special kind of list for providing terms followed by a short text definition or description for them. Definition lists are contained inside the <dl> element. The <dl> element then contains alternating <dt> and <dd> elements. The content of the <dt> element is the term you will be defining.

<dt> Steps</dt>
<dd> This is First Step</dd>
<dd> This is Second Step</dd>
<dt> Shows</dt>
<dd> This is First Show</dd>
<dd> This is Second Show</dd>

Editing Text working on a document with others, it helps if you can see changes that another person has made. Even when working on your own documents, it can be helpful to keep track of changes you make. There are two elements specifically designed for revising and editing text:

  • The <ins> element for when you want to add text (usually shown underlined in a browser)
  • The <del> element for when you want to delete some text (usually shown crossed out in a browser

<p> This is <del>a</del> First<ins> Text</ins> </p>


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s