W3Schools.com

HTML5 <li> Tag

Example

Lists in HTML5:

<ol>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The <li> tag is supported in all major browsers.


Definition and Usage

The <li> tag defines a list item.

The <li> tag is used in ordered lists(<ol>),  unordered lists (<ul>), and in menu lists (<menu>).


Differences Between HTML 4.01 and HTML5

The "type" attribute was deprecated in HTML 4.01, and is NOT supported in HTML5.

The "value" attribute was deprecated in HTML 4.01, but IS supported in HTML5.


Tips and Notes

Tip: Use CSS to define the type of list.


Attributes

Attribute Value Description
value number Specifies the value of a list item. The following list items will increment from that number (only for <ol> lists)

Global Attributes

The <li> tag also supports the Global Attributes in HTML5.


Event Attributes

The <li> tag also supports the Event Attributes in HTML5.


WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE