w3resource

HTML5: How to define an unordered list?

Go to Exercise page

Solution:

HTML Code:

<!DOCTYPE html><!-- Define document type as HTML -->
<html><!-- Begin HTML document -->
<head><!-- Start of document header -->
<meta charset="utf-8"><!-- Define character encoding -->
<title>How to define an unordered list</title><!-- Title of the HTML page -->
</head><!-- End of document header -->
<body><!-- Start of document body -->
<ul><!-- Begin unordered list -->
<li>Tutorials</li><!-- List item: Tutorials -->
<li>Online Practice Editor </li><!-- List item: Online Practice Editor -->
<li>Examples</li><!-- List item: Examples -->
<li>References</li><!-- List item: References -->
<li>Videos</li><!-- List item: Videos -->
</ul><!-- End unordered list -->
</body><!-- End of document body -->
</html><!-- End of HTML document -->
 

Explanation:

  • The HTML code defines an unordered list (<ul>) element, which is a bulleted list.
  • Each list item (<li>) represents an item in the list.
  • The list contains items such as "Tutorials", "Online Practice Editor", "Examples", "References", and "Videos".

Live Demo:

See the Pen ul-answer by w3resource (@w3resource) on CodePen.


See the solution in the browser

Supported browser

Firefox logo Chrome logo Opera logo Safari logo Internet Explorer logo
Yes Yes Yes Yes Yes

Go to Exercise page

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.



Follow us on Facebook and Twitter for latest update.