Tìm hiểu cách tạo bullet points vuông cho unordered lists với CSS property list-style-type.
Mặc định, unordered list items (<ul>) trên trang web dùng bullet points tròn.
Bullet points tròn được style như sau:
ul { list-style-type: disc; }
Và trông như thế này:
- HTML
- CSS
- JavaScript
Để làm bullet points vuông, bạn có thể override cài đặt list-style-type mặc định như sau:
ul { list-style-type: square; }
Ví dụ square bullets:
- HTML
- CSS
- JavaScript
Square bullet points ít phổ biến, nhưng trên một số website, chúng rất phù hợp. Tùy vào giao diện và theme bạn hướng tới.