Loading Please Wait...

Logo Lynxsia IT Solutions

HTML Unordered Lists

Unordered Lists (Bulleted Lists)

Unordered lists are defined by <ul> tag and each list item is defined by <li> tag.

By default each item is marked by bullet (small circle) but this can be change by CSS style.

Let's see with some example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <ul>
                <li>Item 1</li>
                <li>Item 2</li>
                <li>Item 3</li>
                <li>Item 4</li>
              </ul>
            </body>
          </html>
        
      
List Item Markers

We can define list item marker by list-style-type CSS property. The property have the following value

  • disc: Sets the marker to bullet (Default)
  • circle: sets the marker to circle
  • square: sets the marker to square
  • none: remove the marker
Disc Marker
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <ul style="list-style-type: disc;">
                <li>Item 1</li>
                <li>Item 2</li>
              </ul>
            </body>
          </html>
        
      
Circle Marker
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <ul style="list-style-type: circle;">
                <li>Item 1</li>
                <li>Item 2</li>
              </ul>
            </body>
          </html>
        
      
Square Marker
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <ul style="list-style-type: square;">
                <li>Item 1</li>
                <li>Item 2</li>
              </ul>
            </body>
          </html>
        
      
Marker None
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <ul style="list-style-type: none;">
                <li>Item 1</li>
                <li>Item 2</li>
              </ul>
            </body>
          </html>
        
      
Nested List

We can define nested list (lists inside another list).

Let's see with some example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <ul>
                <li>Item 1</li>
                <li>Item 2
                  <ul>
                    <li>Item 2.1</li>
                    <li>Item 2.2</li>
                  </ul>
                </li>
              </ul>
            </body>
          </html>
        
      
Horizontal List

HTML lists can be defined horizontally instead of vertically.

Let's see with some example
					 
        
          <!DOCTYPE html>
          <html>
            <body>
              <ul style="list-style-type: none;">
                <li style="float: left; margin: 10px;">Item 1</li>
                <li style="float: left; margin: 10px;">Item 2</li>
                <li style="float: left; margin: 10px;">Item 3</li>
                <li style="float: left; margin: 10px;">Item 4</li>
              </ul>
            </body>
          </html>
        
      

How you feel about this blog:

Share this blog on:

Report Us

If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com

Contact Us
Ads
Logo
Lynxsia IT Solutions

We are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..

Kotwali Road, Chhiptehri, Banda, 210001, UP, India

Copyright © 2022, Lynxsia IT Solutions, All rights reserved