HTML_4_List

List

An HTML List is used to organize data on web pages into an ordered or unordered format to make the information easier to read and visually appealing. 

Types of HTML Lists

There are 3 main types of lists in HTML:

  1. Unordered Lists (<ul>): These lists are used for items that do not need to be in any specific order. The list items are typically marked with bullets.
  2. Ordered Lists (<ol>): These lists are used when the order of the items is important. Each item in an ordered list is typically marked with numbers or letters.
  3. Description Lists (<dl>): These lists are used to contain terms and their corresponding descriptions.

<ul>

The unordered list is created with the <ul> element.

<ol>

The ordered list is created with the <ol> element.

<li>

Each item in the list is placed between an opening <li> tag and a closing </li> tag. 

The li stands for list item.

<dl>
The definition list is created with the <dl> element and usually consists of a series of terms and their definitions. 
Inside the <dl> element you will usually see pairs of <dt> and <dd> elements.
<dt>
This is used to contain the term being defined (the definition term).
<dd>
This is used to contain the definition.

Unorder List

<ul>
<li>Apple</li>
<li>Mango</li>
<li>Orange</li>
</ul>

<ul type="square">
<li>Apple</li>
<li>Mango</li>
<li>Orange</li>
</ul>

<ul type="circle">
<li>Apple</li>
<li>Mango</li>
<li>Orange</li>
</ul>

Order List

<ol>
<li>Apple</li>
<li>Mango</li>
<li>Orange</li>
</ol>

<ol start="4">
<li>Apple</li>
<li>Mango</li>
<li>Orange</li>
</ol>

<ol type="A">
<li>Apple</li>
<li>Mango</li>
<li>Orange</li>
</ol>

<ol type="a">
<li>Apple</li>
<li>Mango</li>
<li>Orange</li>
</ol>

<ol type="I">
<li>Apple</li>
<li>Mango</li>
<li>Orange</li>
</ol>

<ol type="i">
<li>Apple</li>
<li>Mango</li>
<li>Orange</li>
</ol>


Definition List

<dl>
<dt>HTML</dt>
<dd> Hyper Text Markup Language </dd>
</dl>






Comments

Popular posts from this blog

HTML_1_Introduction

HTML_6_Media

HTML_7_Link