Complete the code to create a blue button with padding and rounded corners using Tailwind CSS.
<button class="bg-blue-500 [1] rounded">Click me</button>
m-4 instead of padding.The p-2 class adds padding inside the button, making it look better. The other options do not add padding.
Complete the code to make the button text white and bold using Tailwind CSS.
<button class="bg-green-600 p-3 rounded [1]">Submit</button>
italic or underline instead of bold.The classes text-white and font-bold make the text white and bold. Other options change style differently.
Fix the error in the button code to make it have a hover effect that darkens the background.
<button class="bg-red-500 p-3 rounded [1]">Delete</button>
hover:text-* changes text color, not background.focus: or active: instead of hover:.The hover:bg-red-700 class changes the background color when the mouse is over the button, creating a hover effect.
Fill both blanks to create a button that is disabled with gray background and cursor not-allowed style.
<button class="p-3 rounded [1] [2]" disabled>Disabled</button>
The bg-gray-400 class gives a gray background, and cursor-not-allowed changes the mouse cursor to show the button is disabled.
Fill all three blanks to create a responsive button that is full width on small screens and auto width on medium and larger screens.
<button class="[1] [2] [3] p-3 rounded bg-purple-600 text-white">Responsive</button>
inline-block which does not fill width.w-full makes the button full width on small screens, md:w-auto sets width to auto on medium and larger screens, and block makes the button behave like a block element so width applies correctly.