HTML Tutorial
- HTML HOME
- HTML Introduction
- HTML Editors
- HTML Basics
- HTML Comments
- HTML Elements
- HTML Attributes
- HTML Headings
- HTML Paragraphs
- HTML Styles
- HTML Text Formatting
- HTML Quotations
- HTML Colors
- HTML Links
- HTML Images
- HTML Favicons: How to Add and Optimize for All Browsers
- HTML Page Title: How to Optimize Titles for SEO Success
- HTML Tables: Create & Optimize for Better Web Design | Codeezy
- HTML Lists: Types, Examples & SEO Tips for Better Structure
- HTML Block and Inline Elements
- HTML Iframes
- HTML File Paths
- HTML Layout
- HTML Computer Code Elements
- HTML Semantics
- HTML5 Semantics
- HTML Entities
- HTML Symbols
- HTML Emojis
- HTML Charsets
HTML Unordered Lists: A Comprehensive Guide
Introduction
An HTML Unordered List (<ul>
) is a fundamental element for displaying a collection of items where the order does not matter. This list format uses bullets to denote each item, making it ideal for presenting information in a non-sequential manner. The <ul>
tag, combined with the <li>
tag, allows you to organize content clearly and effectively.
Table of Contents
- Introduction
- Basic Syntax
- Unordered Lists Style Types
- Examples of HTML Unordered Lists
- Nested Unordered Lists
- Horizontal Unordered Lists
- Conclusion
- HTML Unordered Lists – FAQ
Basic Syntax
To create a basic unordered list, use the following syntax:
- Item 1
- Item 2
Unordered Lists Style Types
The style of bullets in unordered lists can be customized using the list-style-type
CSS property. Here are the different values you can use:
disc
: The default bullet style, represented as a filled circle.circle
: Displays the list marker as an empty circle.square
: Uses a filled square as the list marker.none
: Removes the list markers altogether.
Examples of HTML Unordered Lists
Example 1: Basic Unordered List
HTML Unordered Lists
HTML Unordered Lists
- HTML
- CSS
- JavaScript
- React
Output: Displays a simple list with default disc bullets.
Example 2: Disc Type Unordered List
Disc Type Unordered List
Disc Type Unordered List
- HTML
- CSS
- JavaScript
- React
Output: Uses default disc markers.
Example 3: Square Type Unordered List
Square Type Unordered List
Square Type Unordered List
- HTML
- CSS
- JavaScript
- React
Output: Displays list items with square markers.
Example 4: Circle Type Unordered List
Circle Type Unordered List
Circle Type Unordered List
- HTML
- CSS
- JavaScript
- React
Output: Uses circle markers.
Example 5: None Type Unordered List
None Type Unordered List
None Type Unordered List
- HTML
- CSS
- JavaScript
- React
Output: Displays the list without any markers.
Nested Unordered Lists
You can nest unordered lists within each other to create a hierarchical structure.
Example: Nested Unordered List
Nested Unordered List
Nested Unordered List
- Geeks
-
Web Development
- HTML
- CSS
- JavaScript
Output: Displays a nested list with additional bullet points.
Horizontal Unordered Lists
Unordered lists can be styled horizontally, similar to navigation bars, using CSS.
Example: Horizontal Unordered List
Output: Creates a horizontal list resembling a navigation bar.
Conclusion
The <ul>
tag in HTML is a versatile tool for creating unordered lists with various styling options. Whether you need default bullet points, circles, squares, or no markers, the <ul>
tag offers flexibility to suit different design needs. Nested and horizontal lists further enhance the structure and layout of your web content.
HTML Unordered Lists – FAQs
What is an HTML unordered list?
An HTML unordered list is a collection of items displayed with bullet points, where the sequence of items does not matter.
How to create an unordered list in HTML?
Use the <ul>
tag with nested <li>
(list item) tags.
What does the <ul>
tag represent?
The <ul>
tag represents an unordered list, which displays items with bullet points.
What is the default bullet style for an unordered list?
The default bullet style is a disc (filled circle).
How to change the bullet style of an unordered list?
Use the list-style-type
CSS property to specify the bullet style (e.g., circle, square, none). Example: ul { list-style-type: square; }
How to nest unordered lists in HTML?
Place a <ul>
tag inside an <li>
tag of another <ul>
to create a nested unordered list.
Can you mix unordered and ordered lists?
Yes, you can nest an ordered list (<ol>
) within an unordered list (<ul>
) and vice versa.
Thank You for Visiting Codeezy.org!
We’re thrilled to have you as part of our coding community. Your engagement and support inspire us to continue providing high-quality resources and tools to enhance your web development journey. Whether you’re a beginner or an experienced coder, we hope you found valuable insights and tools here at Codeezy.
Stay connected for more tips, tutorials, and updates to help you code with ease. Thank you for choosing Codeezy.org—your growth as a developer is our motivation!
Happy coding!