Build a Stylized To-Do List - Build a Stylized To-Do list

Tell us what’s happening:

Its saying that after the label elements, there should be an unordered list with the class sub-item, I’m unsure if mine is correct or not. And the li inside the ul with the class (sub-item) should have an anchor element with the class (sub-item-link) I am unsure if that is correct or not.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Styled To-Do List</title>
    <h1> My To-Do List</h1>
    <link href="styles.css" rel="stylesheet"/>
</head>
<body>
        <ul class="todo-list">
            <li>
                <input id="climbing" type="checkbox"/>
                <label for="climbing">Go climbing</label>
                <ul class="sub-item">
                    <li><a class="sub-item-link"
                href="https://cityrock.co.za/" target="_blank">Make booking</a></li>
                </ul>
            </li>

            <li>
                    <input id="hiking" type="checkbox"/>
                    <label for="hiking">Go hiking</label>
                    <ul class="sub-item">
                        <li><a class="sub-item-link"
                href="https://www.viator.com/" target="_blank">View next hike</a></li>
                </ul>
            </li>
            <li>
                    <input id="swimming" type="checkbox"/>
                    <label for="swimming">Go to the beach
                        <ul class="sub-item">
                            <li><a class="sub-item-link" 
                href="https://www.tripadvisor.com/" target="_blank">View beach options</a></li>
                </ul>
                </label>
            </li>
            
            <li>
                    <input  id="wine" type="checkbox"/>
                    <label for="wine">Go wine tasting
                        <ul class="sub-item">
                            <li><a class="sub-item-link"
                href="https://www.tripadvisor.com/" target="_blank">View wine farms</a></li>
                </ul>
                </label>
            </li>
</ul>
</body>

</html>
/* file: styles.css */
body{
  
}

.todo-list {
  list-style-type:none;
}

a{
  text-decoration:none;
}

.sub-item-link:visited{
color:blue;
}

.sub-item-link:hover{
color:saddlebrown;
}

.sub-item-link:focus{
  outline:darkolivegreen;
}

.sub-item-link:active{
color:green;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Avast/132.0.0.0

Challenge Information:

Build a Stylized To-Do List - Build a Stylized To-Do list

where does the label element end? if the ul has to go after it can’t go inside the label element

1 Like