on air

HTML List Elements And Attributes.

back home » webtutorials » HTML » HTML List Elements And Attributes.


Scenario.

In this example, you'll learn how to use the HTML list elements, and attributes in simple beginners steps. Hope your cerebrums catches up this easily.

Ordered List | <ol>.

The ordered list element <ol> is used to define a list, using numbers or letters. The opening and the closing <ol> tags will contain an opening, and closing <li> tags. And the <li> tags will contain what will be listed.

See <ol> Default List illustration below.

<ol>
<li>List numbered</li>
<li>List numbered</li>
<li>List numbered</li>
</ol>

In Browser Display

  1. List numbered
  2. List numbered
  3. List numbered

<ol> List Types And Values.

The ordered list element <ol> uses the TYPE attribute, this can contain any of the following values: [1 | a | A | i| I |]. The value used herein will determine the type of list to be displayed.

Placing the TYPE attribute in the <ol> tag, your defined value will affect the whole <li> tags within.

Whereby, the TYPE attribute is unused. The list will display the default value which will be listed in numbers.

See <ol> Default List illustration above, and compare it with the <ol type> Illustration below.

<ol type="a">
<li>List Type Alpha</li>
<li>List Type Alpha</li>
<li>List Type Alpha</li>
</ol>	

In Browser Display

  1. List Type Alpha
  2. List Type Alpha
  3. List Type Alpha

<ol> Start Attribute.

The second attribute you can attached to the TYPE attribute is START. With this attribute, you can determine, with what number the TYPE value should start listing.

See illustration below.

<ol type="1" start="4">
<li>List Start Alpha</li>
<li>List Start Alpha</li>
<li>List Start Alpha</li>
</ol>

In Browser Display

  1. List Start Alpha
  2. List Start Alpha
  3. List Start Alpha

Unordered List. | <ul>

The unordered list element <ul> is used to define bullet list. The opening and the closing <ul> tags will contain an opening, and closing <li> tags. And the<li> tags will contain what will be listed.

See <ul> Default List illustration below.

<ul>
<li>Default list symbol "disc"</li>
</ul>

In Browser Display

  • Default list symbol "disc"

<ul> List Types And Values.

The unordered list element <ul> uses the TYPE attribute, this can contain any of the following values: [disc | square | circle ]. The value used here will determine the type of list to be displayed.

Whereby, the TYPE attribute, and its value are unused. The list will display the default value which be the "disc" bullet listing.

See <ul> Default List illustration above, and compare it with the <ul type> Illustration below.

<ul type="square">
<li>List symbol "square"</li>
</ul>

In Browser Display

  • List symbol "square"

<li> List Type [Not preferred].

The TYPE attribute can also be placed directly inside the <li> tag of the <ul> elements. And value within will affect specifically only the <li> tag it's used for. [Not preferred]

See illustration below.

<ul>
<li type="disc">List symbol "disc"</li>
<li type="square">List symbol"square"</li>
<li type="circle">List symbol "circle"</li>
</ul>

In Browser Display

  • List symbol "disc"
  • List symbol "square"
  • List symbol "circle"

Using the same method for the <ol> tag will result in that the value used gets handled sequentially, listing both alpha and numbers according to their positions.

See illustration below.

<ol>
<li type="1">List Type Numbered</li>
<li type="a">List Type Alpha</li>
<li type="1">List Type Numbered</li>
<li type="a">List Type Alpha</li>
</ol>

In Browser Display

  1. List Type Numbered
  2. List Type Alpha
  3. List Type Numbered
  4. List Type Alpha

What's been taught here, works in all major browsers. However, in order to obtain the true browser and W3C friendly results, we solemnly recommend using CSS to format list types.

Clicks4UrMind

Man will give you worldly powers, and make you feel on top of all, note this is temporally and could be redrawn at anytime sending you back to the ground floor of life. However, the Lord Almighty, the one and the only rightful ruler of the Universe, blesses everlastingly.

Brain

Knowledge is Power, but Power is not Knowledge. Wisdom is the truthful Power that identifies the Knowledge within the man. And only, I repeat 3x. Only the almighty God has the power to bless the man with his Wisdom forever.

To achieve the Lord's blessings, cease not praying daily, asking for his Wisdom, and you'll be blessed abundantly...

HTML Nested List Video Tutorial

SPYERA PHONE

Spyera Phone

Spyera Phone version is software that you install on a smart phone to monitor everything happening on the phone. After installation, SPYERA secretly records events (sms, call history, phone book, location, emails, What's App messages, IM, Facebook Chat, Skype, See photos taken and many more...) that happen on the phone and delivers these information to a web account, where you can view these reports 24/7 from any Internet enabled computer or mobile phone. SPYERA also allows you to listen to the surroundings of the target mobile , listen to the phone conversation and to know the location of the device.


Please, Kindly Donate What You Can, Enabling Us Pay Hosting And Domain Costing, And Do More.

Please Donate