Lists can be greatly designed by using the classes of W3.CSS:
- India
- Pakistan
- Sri Lanka
w3-ul removes the bullets appearing in general HTML lists and makes a designer list with inner row borders
Output:
- India
- Pakistan
- Sri Lanka
w3-border is a general class to make borders. It can be used with any HTML element. We can even use w3-border-left, w3-border-right, w3-border-top, w3-border-bottom to create particular borders.
Output:
- India
- Pakistan
- Sri Lanka
w3-color can be used with individual <li> also to make every list item appear in different colour.
Output:
A general class w3-hoverable can be used with the <ul> tag to produce the hover effect on list items. We can also use w3-hover-color with individual <li> to produce hover effect of different colours on different list items
Here in this code, an image {2.jpg} and some classes of images are also used. We will learn classes of images in W3.CSS Images.
Output:
- India
- Pakistan
- Sri Lanka
Inline CSS codes are always overriding to the used classes. Here the width property is used to define the 50% width of entire window.
Output:
A simple and general class w3-size can be used with the <ul> tag to make the list appear in different sizes. Like- w3-tiny, w3-small, w3-large etc.