Complete the code to add a hover effect that changes the button background color.
<button class="bg-blue-500 text-white py-2 px-4 rounded [1]:bg-blue-700">Click me</button>
The hover state applies styles when the mouse pointer is over the button, making it interactive and clear to users.
Complete the code to add a focus ring around the input field for accessibility.
<input type="text" class="border rounded py-2 px-3 [1]:ring-2 [1]:ring-blue-500" aria-label="Name input">
The focus state is important for keyboard users to see which element is active. Tailwind uses focus: prefix to style this state.
Fix the error in the button code to apply the active state background color correctly.
<button class="bg-green-500 text-white py-2 px-4 rounded [1]:bg-green-700">Submit</button>
The active state applies styles when the button is being clicked. Tailwind uses active: prefix for this.
Fill both blanks to style a link with underline on hover and change text color on focus.
<a href="#" class="text-blue-600 [1]:underline [2]:text-blue-800">Learn more</a>
Hover adds underline when mouse is over the link. Focus changes text color when keyboard users select the link.
Fill all three blanks to style a button with shadow on hover, scale on active, and outline on focus.
<button class="bg-purple-600 text-white py-2 px-5 rounded transition [1]:shadow-lg [2]:scale-95 [3]:outline-none [3]:ring-4 [3]:ring-purple-300">Press me</button>
Hover adds a shadow for a lifted look. Active scales the button smaller when pressed. Focus adds a visible ring outline for keyboard users.