CSS Lists

CSS Lists

CSS (Cascading Style Sheets) allows you to style HTML lists, such as unordered lists (ul) and ordered lists (ol), using various properties and selectors. Here are some common CSS properties and techniques you can use to style lists:

  1. List Style Type: You can change the appearance of list items’ markers using the list-style-type property. It accepts values like “none” (no markers), “disc” (filled circle), “circle” (hollow circle), “square” (filled square), “decimal” (1, 2, 3…), “lower-alpha” (a, b, c…), “upper-alpha” (A, B, C…), and more.
css
ul {
  list-style-type: circle;
}

ol {
  list-style-type: decimal;
}
  1. List Style Image: You can use a custom image as the marker for list items using the list-style-image property. This property specifies the URL of the image you want to use as the marker.
css
ul {
  list-style-image: url('custom-marker.png');
}
  1. List Style Position: By default, the list item marker appears outside the content box of the list item. You can change this using the list-style-position property. Set it to “inside” to place the marker inside the content box.
css
ul {
  list-style-position: inside;
}
  1. List Item Styling: You can style individual list items using the li selector. This allows you to change the appearance of each list item independently.
css
li {
  color: red;
  font-weight: bold;
}
  1. Nested Lists: CSS allows you to style nested lists differently by using descendant selectors. You can target nested lists inside other lists and apply specific styles.
css
ul ul {
  /* Styles for nested unordered lists */
}

ol ol {
  /* Styles for nested ordered lists */
}

These are just a few examples of how you can style lists with CSS. There are many more properties and techniques available to customize the appearance of lists according to your needs.

Leave a Comment

Your email address will not be published. Required fields are marked *

GLOTRU Footer
Popular Features
Popular Services/

Website Development & Design

App Development & Design

Graphic Design

Digital Marketing

SEO (Search Engine Optimization)

SMM (Social Media Marketing)

Cyber Security

Company

GLOTRU Founder & CEO : __Azam

Registared : Trade,MSME,etc

Board of Director

Team

About Us

Contact Us

Privacy Policy

Return & Refund Policy

Abuse Policy

Copyright Policy

Cookie Policy

Terms & Conditions

Universal Terms of Service

Disclaimer

Legal

Sponsorships

Investor

Press Releases

Our Investments

Brands

Newsroom

Business

...

_

Digital Millennium Copyright Act
DMCA.com Protection Status

_

Content similarity detection
Protected by Copyscape

_

***ANTI-PIRACY WARNING***

...................................................................................

Follow Us :

...................................................................................

SECURE SERVER : [Legal] [Privacy Policy] [Universal Terms of Service] [Do not sell my personal information]

SITE HOSTED : GLOTRU SECURE SERVER Asian Data Centre [You can host your site][Click Here]

SSL : Server Type : [Cloudflare] Certificate Issued By : [Let's Encrypt] Signature Algorithm : [ECDSA with SHA-384]

SITE BUILD SOFTWARE : Content Management System (CMS) Softwere

_

_

_