![]() |
VOOZH | about |
We will learn how to create an unordered list with square bullets using HTML and CSS. This simple yet essential technique enhances the visual appeal of your web pages. We will use the CSS list-style-type: square property to achieve this effect.
The list-style-type property in CSS specifies the appearance of the list item marker. It can be used to create different styles for list bullets, such as discs, circles, squares, or custom counter styles.
Syntax:
list-style-type: disc | circle | square | decimal | lower-roman | upper-roman |
lower-greek | lower-latin | upper-latin | lower-alpha | upper-alpha | none | inherit;To create an unordered list with square bullets, follow these steps:
Example: In the below example, we will create an unordered list of items using <ul> and <li> tags and add CSS list-style-type: square style on <ul> element to make square bullets.
Output:
👁 ImageCreating an unordered list with square bullets using HTML and CSS is a simple yet effective way to enhance the appearance of your lists.