Lists in CSS

Lists are of 2 types.
  • Unordered lists - use ul tag
  • Ordered lists - use ol tag

Unordered lists

  • Apple
  • Orange
  • Banana

Ordered lists

  1. Virat
  2. Sachin
  3. Brett
padding-inline-start is 40px for ol or ul type of elements. That's why list items are rendered 40px off starting point by default. Also display property of list items is set to list-item which is why each list item has specific style. e.g. list items in ordered list are numbered due to display property being set to list-item.

Web development and Automation testing

solutions delivered!!