Forum digitalis

1.4 Lists

Lists

HTML provides different types of lists: unordered lists (<ul> with <li>), ordered lists (<ol> with <li>), and definition lists (<dl> with <dt> for the term and <dd> for the definition). They help structure content in a clear and readable way.

Example

Below are examples for each type of list.

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Example: Lists</title> </head> <body> <h2>Unordered List</h2> <ul> <li>Item A</li> <li>Item B</li> <li>Item C</li> </ul> <h2>Ordered List</h2> <ol> <li>First Step</li> <li>Second Step</li> <li>Third Step</li> </ol> <h2>Definition List</h2> <dl> <dt>HTML</dt> <dd>HyperText Markup Language</dd> <dt>CSS</dt> <dd>Cascading Style Sheets</dd> </dl> </body> </html>