Table of Contents

Web Development Lesson 3 - Lists

Multi-level Lists

Objectives

In this exercise you will:

Setup

Nesting Lists

<h2>Who Am I?</h2>
<ol>
  <li>Family Members</li>
  <li>Hobbies</li>
  <li>Favourite Bands</li>
</ol>
  <li>Family Members
    <ul>
      <li>Father</li>
      <li>Mother</li>
      <li>Sister</li>
      <li>Brother</li>
    </ul>
  </li>

Cascading Styles

ol {
  color: blue;
}

Combining CSS Selectors

  <li>Hobbies
    <ol>
      <li>Music</li>
      <li>Football</li>
      <li>Cycling</li>
    </ol>
  </li>
ol ol {
  font-weight: 700;
}

Tools: Visual Studio Code

HTML Structure

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>

Adding CSS

Final Code

If your code doesn't look quite right or you want to check it against mine, here's what we've been working on.

Next: Checklists