What Is an HTML Bullet?

Article Details
  • Written By: Victoria Blackburn
  • Edited By: Jessica Seminara
  • Last Modified Date: 07 September 2019
  • Copyright Protected:
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
As President of Uruguay, José Mujica refused to live in the presidential mansion and gave away 90% of his salary.  more...

October 16 ,  1964 :  China became the fifth country in the world to successfully detonate a nuclear bomb.  more...

If a user wants to put a list on a webpage, there are two options available — an ordered list and an unordered list. The difference between the two is that with an ordered list, the items are shown with an ascending number or letter, whereas an HTML bullet is used for the items in an unordered list. Each type of list has a different HTML tag, with <OL> </OL> used for ordered lists and <UL> </UL> used for unordered lists.

When a web browser is rendering a webpage and comes across the <UL>tag, it is told that a list follows. Each item within the list is preceded by the list item tag, or <LI>. At each <LI>, the browser inserts an HTML bullet to start off the new item within the list. When coding a list, it is important that the <LI> tag is placed in front of each item. Also, it does not have a closing tag, so the next <LI> tag is the only way the browser knows to put in a new HTML bullet.

The code for creating a bulleted list within a webpage will look like the following:

    <LI> List Item
    <LI> List Item
    <LI> List Item

When it comes to placing an HTML bullet at the front of the listed items, there are three different options available. The choices available are disc, circle and square. The default HTML bullet is a filled in circle, so if a type is not included, the web browser will automatically insert that bullet. When a list is embedded within a list, the HTML bullet for the embedded list is the disc.

The bullet type can be changed for each specific list item or for the entire list. To change a specific list item, the following code would be added: type="square/disc/circle." For a list item with a square bullet, the code would read as follows: <LI type="square">. Changing "square" to "disc" or "circle" will ensure that the wanted HTML bullet is inserted.

To change the bullet used for an entire list, the type attribute is added to the unordered list tag. In this case, if the user wanted a list that had bullets that were squares, the <UL> tag would be written as follows: <UL type="square">. If the list items are specified using just the <LI> tag, then they all would have a square bullet. Adding a type to the <LI> tag would change that specific list item from the square bullet to another HTML bullet.


You might also Like


Discuss this Article

Post your comments

Post Anonymously


forgot password?