Name the elements on this page correctly.
What to build
The same list with the attributes added.
Requirements
- Each of the two
lielements has the classtask. - The second also has the class
done. - The
ulhasid="todo".
Constraints
Only one element may have the id.
Example
class="task done" gives an element two classes.
Why it works
Classes are shared, so that one style can apply to many elements; the id is unique, so that it can be found directly.
Hints
Hint 1
Several classes go in one attribute, separated by a space.
Hint 2
id must be unique.
Solution
Show one correct solution (try it yourself first)
<ul id="todo"> <li class="task">Buy tea</li> <li class="task done">Pay rent</li> </ul>