Complete the code to add consistent padding around the content using Tailwind CSS.
<div class="p-[1] bg-gray-100"> <p>Hello, world!</p> </div>
Using p-4 adds consistent padding of 1rem (16px) around the content, which is a common spacing size in Tailwind.
Complete the code to add consistent horizontal margin using Tailwind CSS.
<div class="mx-[1] bg-blue-200"> <p>Content with horizontal margin</p> </div>
mx-10 adds too much margin and can break layout.mx-1 might be too small to notice.The class mx-3 adds horizontal margin of 0.75rem (12px) on both left and right sides, keeping spacing consistent.
Fix the error in the code to apply consistent vertical padding using Tailwind CSS.
<section class="py-[1] bg-green-100"> <h2>Section Title</h2> </section>
py-full is not a valid Tailwind spacing class.py-0 removes padding, which breaks consistent spacing.The class py-3 adds vertical padding of 0.75rem (12px) on top and bottom, which is consistent and valid. The option full is invalid in this context.
Fill both blanks to create a consistent gap between flex items and padding inside the container.
<div class="flex gap-[1] p-[2] bg-yellow-50"> <div>Item 1</div> <div>Item 2</div> </div>
Using gap-2 adds a small consistent space between flex items, and p-4 adds padding inside the container, keeping spacing balanced.
Fill all three blanks to create a responsive card with consistent margin, padding, and rounded corners.
<article class="m-[1] p-[2] rounded-[3] bg-white shadow"> <h3>Card Title</h3> <p>Card content goes here.</p> </article>
rounded-3 is invalid; rounded sizes use keywords like sm, md, lg.m-4 adds consistent margin around the card, p-5 adds comfortable padding inside, and rounded-lg gives smooth rounded corners for a modern look.