HTML Unordered Lists



 HTML Unordered LISTS

HTML offers web authors three ways for specifying lists of information. All lists must contain one or more list elements. Lists may contain:

 

v  <ul> - An unordered list. This will list items using plain bullets.

 

HTML Unordered Lists

An unordered list is a collection of related items that have no special order or sequence. This list is created by using HTML <ul> tag. Each item in the list is marked with a bullet.

 

<!DOCTYPE html>

<html>

<head>

<title>HTML Unordered List</title>

</head>

<body>

<ul>

<li>Beetroot</li>

<li>Ginger</li>

<li>Potato</li>

<li>Radish</li>

</ul>

</body>

</html>


OUTPUT Is-


The type Attribute

 

You can use type attribute for <ul> tag to specify the type of bullet you like. By default, it is a disc. Following are the possible options:

 

<ul type="square">
<ul type="disc">
<ul type="circle">


Example

Following is an example where we used <ul type="square">

<!DOCTYPE html>

<html>

<head>

<title>HTML Unordered List</title>

</head>

<body>

<ul type="square">

<li>Beetroot</li>

<li>Ginger</li>

<li>Potato</li>

<li>Radish</li>

</ul>

</body>

</html>


Example

Following is an example where we used <ul type="disc">:

<body>

<ul type="disc">

<li>Beetroot</li>

<li>Ginger</li>

<li>Potato</li>

<li>Radish</li>

</ul>

</body>


Example

Following is an example where we used <ul type="circle">:

<body>

<ul type="circle">

<li>Beetroot</li>

<li>Ginger</li>

<li>Potato</li>

<li>Radish</li>

</ul>

</body>



Comments

Popular posts from this blog

Computer Mcq Part 1 (1-50)

Computer MCQ Part 4 (151-200)

Computer MCQ Part 3 (101-150)