Posts

Showing posts with the label List Items

HTML Lists: Ordered, Unordered, and Description Lists

Image
In HTML, we have three types of lists: ordered, unordered, and description lists. Each type of list is suitable for different scenarios and has its own specific tags. Unordered Lists Unordered lists are used when the list's order is not important. Unordered lists are created using the <ul> tag. Each item in the list is marked with a bullet point and is created using the <li> tag. Code Example: <ul> <li>Apple</li> <li>Banana</li> <li>Cherry</li> </ul> Apple Banana Cherry Ordered Lists Ordered lists are used when the order of items is important. They are created using the <ol> tag, and like unordered lists, each item is marked using the <li> tag. By default, the list items are marked with numbers. Code Example: <ol> <li>First</li> <li>Second</li> ...