Friday, 4 November 2011

HTML List Contents

HTML lists are great way to organize content on Websites.

Using <ul> and <li> to create unsorted lists

We need two elements to create an unordered (bulleted) list

  • <ul></ul> The unordered list element creates the list
  • <li></li> We can specify individual items on the list with the list item element

Let us see how to use <ul> and <li>

  1. Start with <ul> tag
  2. Add a pair for list tags <li></li>.
  3. For each new item add another pair of <li></li>.
  4. To complete enter </ul> closing tag.

The must be as follows:

<html>

<head>

<titile>List Items</title>

</head>

<body>

<ul>

<li>First Item</li>
<li>First Item</li>
<li>First Item</li>

</ul>

</body>

</html>

No comments:

Post a Comment