Complete the code to select all paragraphs with class 'highlight'.
p[1]highlight { color: red; }The dot . is used to select elements by their class name in CSS.
Complete the code to select an element with ID 'main'.
[1]main { background-color: yellow; }The hash # is used to select elements by their ID in CSS.
Fix the error in the selector to increase specificity by selecting a button inside a div with class 'container'.
div[1]container button { font-weight: bold; }To select elements by class, use a dot .. Here, div.container button selects buttons inside divs with class 'container'.
Fill both blanks to select all list items inside an unordered list with class 'menu'.
ul[1]menu [2] { color: blue; }
The selector ul.menu li selects all li elements inside a ul with class 'menu'.
Fill all three blanks to create a selector that selects all paragraphs with class 'text' inside a section with ID 'content'.
section[1]content [2].[3] { font-size: 1.2rem; }
The selector section#content p.text selects all p elements with class 'text' inside the section with ID 'content'.