Complete the code to add a class named "highlight" to the paragraph.
<p [1]>This is a paragraph.</p>The class attribute is used to assign a class name to an HTML element. Here, class="highlight" adds the class highlight to the paragraph.
Complete the code to add two classes "btn" and "primary" to the button.
<button [1]>Click me</button>Multiple classes are added by listing them separated by spaces inside the class attribute. So class="btn primary" adds both classes.
Fix the error in the code to correctly add a class "menu" to the nav element.
<nav [1]>Main menu</nav>The class attribute value must be inside quotes. The correct syntax is class="menu".
Fill both blanks to add a class "container" to the div and a class "title" to the h1.
<div [1]> <h1 [2]>Welcome</h1> </div>
Use the class attribute to add classes. The div gets class="container" and the h1 gets class="title".
Fill all three blanks to add classes "nav", "active", and "link" to the elements respectively.
<nav [1]> <ul> <li class="item"><a [2] href="#">Home</a></li> <li><a [3] href="#">About</a></li> </ul> </nav>
The nav element gets class="nav", the first a tag gets class="active", and the second a tag gets class="link".