
- HTML Home
- HTML Roadmap
- HTML Introduction
- HTML History & Evolution
- HTML Editors
- HTML Basic Tags
- HTML Elements
- HTML Attributes
- HTML Headings
- HTML Paragraphs
- HTML Fonts
- HTML Blocks
- HTML Style Sheet
- HTML Formatting
- HTML Quotations
- HTML - Comments
- HTML - Colors
- HTML - Images
- HTML - Image Map
- HTML - Frames
- HTML - Iframes
- HTML - Phrase Elements
- HTML - Code Elements
- HTML - Meta Tags
- HTML - Classes
- HTML - IDs
- HTML - Backgrounds
- HTML Tables
- HTML - Tables
- HTML - Table Headers & Captions
- HTML - Table Styling
- HTML - Table Colgroup
- HTML - Nested Tables
- HTML Lists
- HTML - Lists
- HTML - Unordered Lists
- HTML - Ordered Lists
- HTML - Definition Lists
- HTML Links
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML Color Names & Values
- HTML - Color Names
- HTML - RGB & RGBA Colors
- HTML - HEX Colors
- HTML - HSL & HSLA Colors
- HTML - HSL Color Picker
- HTML Forms
- HTML - Forms
- HTML - Form Attributes
- HTML - Form Control
- HTML - Input Attributes
- HTML Media
- HTML - Video Element
- HTML - Audio Element
- HTML - Embed Multimedia
- HTML Header
- HTML - Head Element
- HTML - Adding Favicon
- HTML - Javascript
- HTML Layouts
- HTML - Layouts
- HTML - Layout Elements
- HTML - Layout using CSS
- HTML - Responsiveness
- HTML - Symbols
- HTML - Emojis
- HTML - Style Guide
- HTML Graphics
- HTML - SVG
- HTML - Canvas
- HTML APIs
- HTML - Geolocation API
- HTML - Drag & Drop API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web Storage
- HTML - Server Sent Events
- HTML Miscellaneous
- HTML - Document Object Model (DOM)
- HTML - MathML
- HTML - Microdata
- HTML - IndexedDB
- HTML - Web Messaging
- HTML - Web CORS
- HTML - Web RTC
- HTML Demo
- HTML - Audio Player
- HTML - Video Player
- HTML - Web slide Desk
- HTML Tools
- HTML - Velocity Draw
- HTML - QR Code
- HTML - Modernizer
- HTML - Validation
- HTML - Color Picker
- HTML References
- HTML - Cheat Sheet
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Character Entities
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
HTML - <ul> Tag
Introduction to <ul>l Tag
The HTML <ul> tag is used to create an unordered list. Items in an unordered-list are displayed as bullets, which can take various forms, such as dots, a circles, or a squares.
An unordered list(ul) is used to group a collection of items that do not have a numerical order. The unordered list contains multiple <li> tags to create list items.
Syntax
Following is the syntax of <ul> tag −
<ul> ..... </ul>
Attributes
The HTML <ul> tag supports Global and Event attributes. It also accepts some specific attributes, which are listed below.
Attribute | Value | Description |
---|---|---|
compact | compact | Specifies that an unordered list should be presented in a compact style(Deprecated). |
type | disc circle square |
Specifies the different bullet styles for list items(Deprecated). |
Example: Creating an Unordered List
In the following example, we create an unordered list in HTML to display related items in the default bullet format. This HTML code creates a webpage with a heading and an unordered list, displaying "HTML", "CSS", and "JavaScript".
<!DOCTYPE html> <html lang="en"> <head> <title>HTML ul Tag</title> </head> <body> <!-- Creating an Unordered list--> <h3> List of technologies for Basic Web Development </h3> <ul> <li>HTML</li> <li>CSS</li> <li>JavaScript</li> </ul> </body> </html>
Example: Different Bullet Styles
Here is another example of an unordered list. In this example, we use the type attribute to display the list of items in different bullet formats.
<!DOCTYPE html> <html lang="en"> <head> <title>HTML ul Tag</title> </head> <body> <!-- Creating an Unordered list--> <h3>Default or Disc Unordered List</h3> <ul type="disc"> <li>HTML</li> <li>CSS</li> <li>JavaScript</li> </ul> <h3>Cicle Unordered List</h3> <ul type="circle"> <li>HTML</li> <li>CSS</li> <li>JavaScript</li> </ul> <h3>Square Unordered List</h3> <ul type="square"> <li>HTML</li> <li>CSS</li> <li>JavaScript</li> </ul> </body> </html>
Example: Nested Unordered List
In the following example, we create a nested unordered list to display related items. This HTML code generates a webpage with a heading and a nested unordered list, showcasing various web development tools and technologies.
<!DOCTYPE html> <html lang="en"> <head> <title>HTML ul Tag</title> </head> <body> <!-- Creating an Unordered Nested list--> <h3>List of Tools and Technologies for Web Development</h3> <ul type="disc"> <li>HTML</li> <li>CSS <ul> <li>Bootstrap / Tailwind CSS</li> <li>SASS / LESS</li> </ul> </li> <li>JavaScript <ul> <li>ReactJS</li> <li>NodeJS</li> </ul> </li> </ul> </body> </html>
Supported Browsers
Tag | ![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|---|
ul | Yes | Yes | Yes | Yes | Yes |