HTMLforall

  HTML | PHP | Forum

HTML <li> tag

Syntax

<li> - </li>

Definition and Usage

The LI element defines a list item. The element must be contained within DIR, MENU, OL or UL.

Unless used with the deprecated MENU or DIR elements, LI may contain block-level elements, including H2, TABLE, UL, and OL. This allows OL and UL to be nested.

Optional Attributes

Attribute Value Description
type Case-insensitive for UL, DIR & MENU

A - uppercase alphabetic: A, B, C, D, E, F, G, H, ...
a - lowercase alphabetic: a, b, c, d, e, f, g, h, i, j, k, ...
I - uppercase Roman numerals: I, II, III, IV, V, ...
i - lowercase Roman numerals: i, ii, iii, iv, v, ...
1 - decimal numbers: 1, 2, 3, 4, 5, ...

Case sensitive for OL

disc - a filled-in circle
square - a square outline
circle - a circle outline

Specifies the type of the list. Deprecated. Replace by style sheets









value number_of_items_in_list Deprecated. Replace by style sheets

Standard Attributes

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.

Event Attributes

onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

For a full description, go to Event Attributes.

Example

Source Output
<ol>
<li>Tehe elder scrolls</li>
<li>Titan Quest</li>
<li>Rise of Nations</li>
</ol>

<ul>
<li>Tehe elder scrolls</li>
<li>Titan Quest</li>
<li>Rise of Nations</li>
</ul>

  1. Tehe elder scrolls
  2. Titan Quest
  3. Rise of Nations
  • Tehe elder scrolls
  • Titan Quest
  • Rise of Nations

Home

Learn HTML
HTML Tutorial

HTML Reference
HTML by function
HTML by Alphabet

HTML events
HTML attributes
HTML color names

Top-Level Elements
<!--...-->
<!DOCTYPE> 
<html>
<head>
<body>
<frameset>
Head Elements
<base>
<isindex>
<link>
<meta>
<script>
<style>
<title>
Generic Block-level Elements
<address>
<blockquote>
<center>
<del>
<div>
<h1> to <h6>
<hr>
<ins>
<isindex>
<noscript>
<p>
<pre>
Lists
<dd>
<dir>
<dl>
<dt>
<li>
<menu>
<ol>
<ul>
Tables
<caption>
<col>
<colgroup>
<table>
<tbody>
<td>
<tfoot>
<th>
<thead>
<tr>
Forms
<button>
<fieldset>
<form>
<input>
<label>
<legend>
<option>
<optgroup>
<select>
<textarea>
Special Inline Elements
<a>
<applet>
<area>
<basefont>
<bdo>
<br>
<font>
<iframe>
<img>
<map>
<object>
<param>
<q>
<script>
<span>
<sub>
<sup>
Phrase Elements
<abbr>
<acronym>
<cite>
<code>
<del>
<dfn>
<em>
<ins>
<kbd>
<samp>
<strong>
<var>
Font Style Elements
<b>
<big>
<i>
<s>
<small>
<strike>
<tt>
<u>
Frames
<frame>
<frameset>
<noframes>

 

Copyright 2005-8 Sunilcare.  All Rights Reserved.
Comments or suggestions? Contact us.About us