Creating Unordered List
An unordered list can be used whenever the order of items you want to list is insignificant or the items to be listed are in no particular order. HTML offers three different default special characters to use with an unordered list: a bullet (●), a circle (O ), and a square. In order to create unordered or bulleted list you need the following tags: <ul>, <li>, </li> and </ul>. Open your text editor again and key in the code below.
<html> <head><title>Unordered List</title></head> <body> <p>My Favorite Websites:</p> <ul> <li>Google.com</li> <li>Yahoo.com</li> <li>Facebook.com</li> <li>Wikipedia.org</li> <li>Youtube.com</li> </ul> </body> </html>
The previous code will be displayed in Mozilla Firefox like this.
About the code:
- The <ul> tag stands for unordered list, it tells the browser that an unordered list is about to start.
- The <li> tag stands for list item, wherein each item corresponds to a bullet.
- The </li> tag tells the browser that the list item has ended.
- The </ul> tag tells the browser to end the unordered list.
Key in the following codes on your text editor.
<html> <head><title>Unordered List 2</title></head> <body> <p>My Favorite Websites:</p> <ul> <li>Google.com</li> <li type="circle">Yahoo.com</li> <li type="square">Facebook.com</li> <li type="disc">Wikipedia.org</li> <li>Youtube.com</li> </ol> </body> </html>
The code will be rendered by Mozilla Firefox this way.
What happen to the bullet styles as you apply the type attribute?
1 comments:
Cool. Didn't know how to change the bullets before
Post a Comment