Menu
CoddyTech

A Styled First Run

Part of the Fundamentals section of Coddy's Tailwind CSS journey. Lesson 1 of 55.

A trail club notice uses p-4 to leave 16 pixels between its border and content. Tailwind supplies small CSS classes called utilities; adding one to an HTML class attribute applies its rule.

<div class="bg-black text-white p-4">Museum sample</div>

The supplied workspace compiles Tailwind CSS 4.1.13 locally. Its stylesheet begins with @import 'tailwindcss';. The preview updates when you press Run preview, while Check/Run code grades the rendered page. Numeric spacing uses a 0.25rem unit, normally 4 pixels: multiply the utility number by 4 to find the pixel spacing.

challenge icon

Challenge

Easy

No edits are needed. Press Run preview to see the completed Trail Club notice, then use Check/Run code to complete this first activity. The white text sits on a black panel with 24 pixels of inside padding.

Try it yourself

<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Practice studio</title><link rel="stylesheet" href="./styles.css"></head><body>
<div id="target" class="bg-black text-white p-6">Trail Club</div>
</body></html>
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Fundamentals