Unordered list:
■ This type of list has bullets in front of its items.
■ <ul> tag is used
■ Every list item is enclosed in <li> tag.
Unordered List Attributes
(Optional) It defines which type of bullet will be used. It may have one of the following values-
◉ circle
◉ disc
◉ square
◉ none
Syntax :
<ul type= "circle|disc|square|none">
<li>write here</li>
<li>write here</li>
...
</ul>
<li>write here</li>
<li>write here</li>
...
</ul>
Example Unordered list with Stepwise :
2 Copy code
<!DOCTYPE html>
<html><title> welcome to list </title>
<body>
<ul >
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ul>
</body>
</html>
Output:
- First item
- Second item
- Third item
- Fourth item
Note: ul means unordered list
Unordered List Using Attributes
1 Open notepad
2 Copy and Past Code and Save file
<!DOCTYPE html>
<html><title> welcome to list </title>
<body>
<ul type=circle>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ul>
</body>
</html>
Output
- First item
- Second item
- Third item
- Fourth item
Note: If you change <ul type=disc>
Output:
- First item
- Second item
- Third item
- Fourth item
If you change <ul type=Square>
Output:
- First item
- Second item
- Third item
- Fourth item
1 comments:
commentspanu
Reply