WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

CSS Lists


The CSS list properties enable us to set diverse rundown item

  1. English
  2. Chinese
  3. Spanish
  4. Hindi
  • Arabic
  • Portuguese
  • Russian

HTML Lists and CSS List Properties

In HTML, there are two fundamental sorts of lists:

  • unordered records (<ul>) - the rundown things are set apart with bullets
  • ordered records (<ol>) - the rundown things are set apart with numbers or letters

The CSS list properties permit you to:

  • Set diverse rundown thing markers for requested lists
  • Set distinctive rundown thing markers for unordered lists
  • Set a picture as the rundown thing marker
  • Add foundation hues to records and rundown items

Different List Item Markers

The list-style-type property determines the sort of rundown thing marker.

The following model demonstrates a portion of the accessible rundown thing markers:

Example

ul {
    list-style-type: circle;
}

ul{
    list-style-type: square;
}


ol{
    list-style-type: lower-alpha;
}
Try it yourself »

Note: Some of the qualities are for unordered records, and some for requested lists.


An Image as The List Item Marker

The list-style-image determines a picture to be utilized as the rundown thing marker:

Example

ul {
    list-style-picture: url('welookups.gif');
}
Try it yourself »

Position The List Item Markers

The list-style-position property determines whether the rundown thing markers ought to show up inside or outside the substance flow:

Example

ul {
    list-style-position: inside;
}
Try it yourself »

List - Shorthand property

The list-style property is a shorthand property. It is utilized to set all the list properties in one declaration:

Example

ul {
    list-style: square inside url("welookups.gif");
}
Try it yourself »

When utilizing the shorthand property, the request of the property estimations are:

  • list-style-type (if a rundown style-picture is determined, the estimation of this property will be shown if the picture for reasons unknown can't be displayed)
  • list-style-position (indicates whether the rundown thing markers ought to show up inside or outside the substance flow)
  • list-style-image (determines a picture as the rundown thing marker)

If one of the property estimations above are feeling the loss of, the default an incentive for the missing property will be embedded, if any.


Styling List With Colors

We can likewise style records with hues, to make them look somewhat more interesting.

Anything added to the <ol> or <ul> tag, influences the whole rundown, while properties added to the <li> label will influence the individual rundown items:

Example

ol {
    foundation: #ff9999;
    cushioning: 20px;
}

ul {
    foundation: #3399ff;
    cushioning: 20px;
}

ol li {
    foundation: #ffe5e5;
    cushioning: 5px;
    edge left: 35px;
}

ul li {
    foundation: #cce5ff;
    edge: 5px;
}

Result:

  1. English
  2. Chinese
  3. Spanish
  4. Hindi
  • Arabic
  • Portuguese
  • Russian
Try it yourself »



The CSS list properties enable us to set diverse rundown item

  1. English
  2. Chinese
  3. Spanish
  4. Hindi
  • Arabic
  • Portuguese
  • Russian

HTML Lists and CSS List Properties

In HTML, there are two fundamental sorts of lists:

  • unordered records (<ul>) - the rundown things are set apart with bullets
  • ordered records (<ol>) - the rundown things are set apart with numbers or letters

The CSS list properties permit you to:

  • Set diverse rundown thing markers for requested lists
  • Set distinctive rundown thing markers for unordered lists
  • Set a picture as the rundown thing marker
  • Add foundation hues to records and rundown items

Different List Item Markers

The list-style-type property determines the sort of rundown thing marker.

The following model demonstrates a portion of the accessible rundown thing markers:

Example

ul {
    list-style-type: circle;
}

ul{
    list-style-type: square;
}


ol{
    list-style-type: lower-alpha;
}
Try it yourself »

Note: Some of the qualities are for unordered records, and some for requested lists.


An Image as The List Item Marker

The list-style-image determines a picture to be utilized as the rundown thing marker:

Example

ul {
    list-style-picture: url('welookups.gif');
}
Try it yourself »

Position The List Item Markers

The list-style-position property determines whether the rundown thing markers ought to show up inside or outside the substance flow:

Example

ul {
    list-style-position: inside;
}
Try it yourself »

List - Shorthand property

The list-style property is a shorthand property. It is utilized to set all the list properties in one declaration:

Example

ul {
    list-style: square inside url("welookups.gif");
}
Try it yourself »

When utilizing the shorthand property, the request of the property estimations are:

  • list-style-type (if a rundown style-picture is determined, the estimation of this property will be shown if the picture for reasons unknown can't be displayed)
  • list-style-position (indicates whether the rundown thing markers ought to show up inside or outside the substance flow)
  • list-style-image (determines a picture as the rundown thing marker)

If one of the property estimations above are feeling the loss of, the default an incentive for the missing property will be embedded, if any.


Styling List With Colors

We can likewise style records with hues, to make them look somewhat more interesting.

Anything added to the <ol> or <ul> tag, influences the whole rundown, while properties added to the <li> label will influence the individual rundown items:

Example

ol {
    foundation: #ff9999;
    cushioning: 20px;
}

ul {
    foundation: #3399ff;
    cushioning: 20px;
}

ol li {
    foundation: #ffe5e5;
    cushioning: 5px;
    edge left: 35px;
}

ul li {
    foundation: #cce5ff;
    edge: 5px;
}

Result:

  1. English
  2. Chinese
  3. Spanish
  4. Hindi
  • Arabic
  • Portuguese
  • Russian
Try it yourself »