TW

Tailwind CSS Student Module

Beginner to Advanced Course Pack

ID: career-infoway-home

Learn Tailwind CSS Step-by-Step

Welcome to Class, Developers!

This upgraded student module teaches Tailwind CSS from beginner to advanced level using easy English, visual examples, and many old CSS vs new Tailwind comparisons.

Beginner Friendly

Simple words and small examples.

Code Comparison

Old CSS vs Tailwind side by side.

Advanced Topics

Dark mode, custom config, components and production tips.

ID: career-infoway-syllabus

Course Syllabus Dashboard

Click any topic from the sidebar or cards below.

Level: Module 1: Beginner Foundations

Introduction & Setup

What Tailwind is and how to start. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
Study the comparison examples below, then practice by editing classes in your HTML.

Old CSS vs New Tailwind Examples

Add Tailwind CDN

Old CSS way: you create a custom class and write CSS separately.

<script src="https://cdn.tailwindcss.com"></script>

Tailwind way: you write ready-made utility classes directly in HTML.

<script src="https://cdn.tailwindcss.com"></script>

Live Preview Output

Preview area

Output of the code will appear like this.

Simple Card

Old CSS way: you create a custom class and write CSS separately.

<div class="card">Hello</div>
.card{padding:24px;border-radius:16px;background:white;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="p-6 rounded-2xl bg-white">Hello</div>

Live Preview Output

Preview Card

This is how the card will look on website.

Level: Module 1: Beginner Foundations

Utility First Workflow

Old CSS vs Tailwind mindset. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
Study the comparison examples below, then practice by editing classes in your HTML.

Old CSS vs New Tailwind Examples

Button

Old CSS way: you create a custom class and write CSS separately.

 .btn{padding:10px 18px;background:#2563eb;color:#fff;border-radius:10px;}

Tailwind way: you write ready-made utility classes directly in HTML.

<button class="px-5 py-2.5 bg-blue-600 text-white rounded-lg">Save</button>

Live Preview Output

Card Shadow

Old CSS way: you create a custom class and write CSS separately.

.card{background:#fff;box-shadow:0 10px 20px #0002;border-radius:16px;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="bg-white shadow-xl rounded-2xl">...</div>

Live Preview Output

Preview Card

This is how the card will look on website.

Center Box

Old CSS way: you create a custom class and write CSS separately.

.box{display:flex;align-items:center;justify-content:center;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="flex items-center justify-center">...</div>

Live Preview Output

Centered Item
Level: Module 1: Beginner Foundations

Typography & Colors

Text size, weight, color and palettes. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.

Small light text

Medium amber text

Big bold indigo text

Old CSS vs New Tailwind Examples

Heading

Old CSS way: you create a custom class and write CSS separately.

.title{font-size:36px;font-weight:800;color:#1e293b;}

Tailwind way: you write ready-made utility classes directly in HTML.

<h1 class="text-4xl font-extrabold text-slate-800">Title</h1>

Live Preview Output

Beautiful Main Heading

Paragraph

Old CSS way: you create a custom class and write CSS separately.

.text{font-size:14px;line-height:1.7;color:#64748b;}

Tailwind way: you write ready-made utility classes directly in HTML.

<p class="text-sm leading-7 text-slate-500">Text</p>

Live Preview Output

This paragraph uses comfortable line height and soft color, so users can read it easily.

Gradient Text

Old CSS way: you create a custom class and write CSS separately.

.brand{background:linear-gradient(...);-webkit-background-clip:text;color:transparent;}

Tailwind way: you write ready-made utility classes directly in HTML.

<h2 class="bg-gradient-to-r from-indigo-600 to-pink-500 bg-clip-text text-transparent">Brand</h2>

Live Preview Output

Gradient Text Preview

Level: Module 1: Beginner Foundations

Spacing & Box Model

Padding, margin, width and height. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
class="p-6" means 24px padding

Old CSS vs New Tailwind Examples

Padding

Old CSS way: you create a custom class and write CSS separately.

.box{padding:24px;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="p-6">...</div>

Live Preview Output

Box with padding inside

Margin Top

Old CSS way: you create a custom class and write CSS separately.

.section{margin-top:32px;}

Tailwind way: you write ready-made utility classes directly in HTML.

<section class="mt-8">...</section>

Live Preview Output

First Box
Second Box with top margin

Width

Old CSS way: you create a custom class and write CSS separately.

.panel{max-width:768px;margin:auto;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="max-w-3xl mx-auto">...</div>

Live Preview Output

Responsive width box
Level: Module 2: Intermediate UI

Hover, Focus & States

Interactive buttons and form states. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.

Old CSS vs New Tailwind Examples

Hover Button

Old CSS way: you create a custom class and write CSS separately.

.btn:hover{background:#1d4ed8;transform:scale(.98);}

Tailwind way: you write ready-made utility classes directly in HTML.

.btn equivalent: <button class="hover:bg-blue-700 active:scale-95 transition">

Live Preview Output

Focus Input

Old CSS way: you create a custom class and write CSS separately.

.input:focus{outline:0;box-shadow:0 0 0 4px #bfdbfe;}

Tailwind way: you write ready-made utility classes directly in HTML.

<input class="focus:outline-none focus:ring-4 focus:ring-blue-200">

Live Preview Output

Disabled

Old CSS way: you create a custom class and write CSS separately.

.btn[disabled]{opacity:.5;cursor:not-allowed;}

Tailwind way: you write ready-made utility classes directly in HTML.

<button class="disabled:opacity-50 disabled:cursor-not-allowed">

Live Preview Output

Level: Module 2: Intermediate UI

Flexbox Essentials

Horizontal and vertical alignment. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
Left
Right

Old CSS vs New Tailwind Examples

Navbar

Old CSS way: you create a custom class and write CSS separately.

.nav{display:flex;align-items:center;justify-content:space-between;gap:16px;}

Tailwind way: you write ready-made utility classes directly in HTML.

<nav class="flex items-center justify-between gap-4">

Live Preview Output

LogoHomeAbout

Vertical Center

Old CSS way: you create a custom class and write CSS separately.

.wrap{display:flex;align-items:center;min-height:100vh;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="min-h-screen flex items-center">

Live Preview Output

Centered Item

Stack On Mobile

Old CSS way: you create a custom class and write CSS separately.

.row{display:flex;flex-direction:column;}@media(min-width:640px){.row{flex-direction:row}}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="flex flex-col sm:flex-row">

Live Preview Output

One
Two
Three
Level: Module 2: Intermediate UI

Grid Systems

Card layouts and spans. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
col-span-2
col-span-1

Old CSS vs New Tailwind Examples

Three Cards

Old CSS way: you create a custom class and write CSS separately.

.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="grid gap-4 md:grid-cols-3">

Live Preview Output

Preview Card

This is how the card will look on website.

Feature Span

Old CSS way: you create a custom class and write CSS separately.

.feature{grid-column:span 2;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="md:col-span-2">

Live Preview Output

Feature 1
Feature 2
Feature 3

Auto Layout

Old CSS way: you create a custom class and write CSS separately.

.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">

Live Preview Output

Feature 1
Feature 2
Feature 3
Level: Module 2: Intermediate UI

Responsive Design

Mobile first breakpoints. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
Resize screen: base โ†’ sm โ†’ md โ†’ lg

Old CSS vs New Tailwind Examples

Mobile First

Old CSS way: you create a custom class and write CSS separately.

.title{font-size:24px;}@media(min-width:768px){.title{font-size:48px;}}

Tailwind way: you write ready-made utility classes directly in HTML.

<h1 class="text-2xl md:text-5xl">Title</h1>

Live Preview Output

Resize screen to see responsive changes

Hide/Show

Old CSS way: you create a custom class and write CSS separately.

.desktop{display:none;}@media(min-width:1024px){.desktop{display:block;}}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="hidden lg:block">Desktop</div>

Live Preview Output

Resize screen to see responsive changes

Responsive Padding

Old CSS way: you create a custom class and write CSS separately.

.section{padding:16px;}@media(min-width:768px){.section{padding:48px;}}

Tailwind way: you write ready-made utility classes directly in HTML.

<section class="p-4 md:p-12">

Live Preview Output

Box with padding inside
Level: Module 2: Intermediate UI

Forms & Inputs

Inputs, labels, validation UI. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.

Use focus classes for better UX.

Old CSS vs New Tailwind Examples

Input

Old CSS way: you create a custom class and write CSS separately.

.input{border:1px solid #cbd5e1;padding:12px;border-radius:10px;}

Tailwind way: you write ready-made utility classes directly in HTML.

<input class="w-full rounded-lg border border-slate-300 px-4 py-3">

Live Preview Output

Label

Old CSS way: you create a custom class and write CSS separately.

.label{font-size:12px;font-weight:700;color:#475569;}

Tailwind way: you write ready-made utility classes directly in HTML.

<label class="text-xs font-bold text-slate-600">Email</label>

Live Preview Output

Error Text

Old CSS way: you create a custom class and write CSS separately.

.error{font-size:12px;color:#dc2626;margin-top:4px;}

Tailwind way: you write ready-made utility classes directly in HTML.

<p class="mt-1 text-xs text-red-600">Required field</p>

Live Preview Output

Please enter a valid email.

Level: Module 3: Advanced UI

Reusable Components

Buttons, cards, badges, alerts. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
New

Reusable Card

Build once, reuse everywhere.

Old CSS vs New Tailwind Examples

Badge

Old CSS way: you create a custom class and write CSS separately.

.badge{display:inline-flex;padding:4px 10px;border-radius:999px;background:#e0e7ff;color:#4338ca;}

Tailwind way: you write ready-made utility classes directly in HTML.

<span class="inline-flex rounded-full bg-indigo-100 px-2.5 py-1 text-indigo-700">New</span>

Live Preview Output

New Course

Alert

Old CSS way: you create a custom class and write CSS separately.

.alert{border-left:4px solid #2563eb;background:#eff6ff;padding:16px;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="border-l-4 border-blue-600 bg-blue-50 p-4">Info</div>

Live Preview Output

Your profile is 80% complete.

Card Component

Old CSS way: you create a custom class and write CSS separately.

.card{padding:24px;background:white;border:1px solid #e2e8f0;border-radius:20px;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="rounded-2xl border border-slate-200 bg-white p-6">

Live Preview Output

Preview Card

This is how the card will look on website.

Level: Module 3: Advanced UI

Transitions & Animation

Smooth motion and transforms. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
Hover me

Old CSS vs New Tailwind Examples

Smooth Hover

Old CSS way: you create a custom class and write CSS separately.

.card{transition:.2s}.card:hover{transform:translateY(-4px);}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="transition hover:-translate-y-1">

Live Preview Output

Hover this card

Rotate Icon

Old CSS way: you create a custom class and write CSS separately.

.icon:hover{transform:rotate(12deg);}

Tailwind way: you write ready-made utility classes directly in HTML.

<span class="inline-block transition hover:rotate-12">โ˜…</span>

Live Preview Output

Pulse

Old CSS way: you create a custom class and write CSS separately.

.dot{animation:pulse 2s infinite;}

Tailwind way: you write ready-made utility classes directly in HTML.

<span class="animate-pulse">โ—</span>

Live Preview Output

Level: Module 3: Advanced UI

Dark Mode Setup

Class-based dark mode patterns. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
Use the top button to preview dark mode.

Old CSS vs New Tailwind Examples

Dark Card

Old CSS way: you create a custom class and write CSS separately.

.dark .card{background:#0f172a;color:white;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="bg-white text-slate-900 dark:bg-slate-900 dark:text-white">

Live Preview Output

Preview Card

This is how the card will look on website.

Dark Border

Old CSS way: you create a custom class and write CSS separately.

.dark .box{border-color:#334155;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="border border-slate-200 dark:border-slate-700">

Live Preview Output

Dark mode ready card

Use top button to test.

Dark Text

Old CSS way: you create a custom class and write CSS separately.

.dark .muted{color:#94a3b8;}

Tailwind way: you write ready-made utility classes directly in HTML.

<p class="text-slate-500 dark:text-slate-400">Muted</p>

Live Preview Output

Dark mode ready card

Use top button to test.

Level: Module 4: Advanced Tailwind

Custom Theme Config

Extend colors, spacing and fonts. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
Study the comparison examples below, then practice by editing classes in your HTML.

Old CSS vs New Tailwind Examples

Config Color

Old CSS way: you create a custom class and write CSS separately.

colors:{brand:"#6D28D9"}

Tailwind way: you write ready-made utility classes directly in HTML.

tailwind.config = { theme:{ extend:{ colors:{ brand:"#6D28D9" }}}}

Live Preview Output

Custom design token preview

Use Custom Color

Old CSS way: you create a custom class and write CSS separately.

.btn{background:#6D28D9;}

Tailwind way: you write ready-made utility classes directly in HTML.

<button class="bg-brand text-white">Brand Button</button>

Live Preview Output

Custom design token preview

Arbitrary Value

Old CSS way: you create a custom class and write CSS separately.

.box{height:73px;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="h-[73px]">...</div>

Live Preview Output

Custom design token preview
Level: Module 4: Advanced Tailwind

Real Layout Patterns

Navbar, hero, pricing and dashboard blocks. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
Study the comparison examples below, then practice by editing classes in your HTML.

Old CSS vs New Tailwind Examples

Hero Section

Old CSS way: you create a custom class and write CSS separately.

.hero{padding:80px 24px;text-align:center;}

Tailwind way: you write ready-made utility classes directly in HTML.

<section class="px-6 py-20 text-center">

Live Preview Output

Build Modern Websites

Learn Tailwind with real UI examples.

Pricing Card

Old CSS way: you create a custom class and write CSS separately.

.pricing{border:1px solid #ddd;border-radius:24px;padding:32px;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="rounded-3xl border p-8 shadow-sm">

Live Preview Output

Preview Card

This is how the card will look on website.

Dashboard Stat

Old CSS way: you create a custom class and write CSS separately.

.stat{display:flex;justify-content:space-between;padding:20px;}

Tailwind way: you write ready-made utility classes directly in HTML.

<div class="flex items-center justify-between rounded-xl p-5">

Live Preview Output

Users

1,240

Sales

โ‚น85k

Growth

32%
Level: Module 4: Advanced Tailwind

Production & Performance

Build workflow and best practices. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
Study the comparison examples below, then practice by editing classes in your HTML.

Old CSS vs New Tailwind Examples

Avoid Long Repeated Classes

Old CSS way: you create a custom class and write CSS separately.

Copy same classes everywhere

Tailwind way: you write ready-made utility classes directly in HTML.

Create component snippets or use framework components

Live Preview Output

npm run build โœ“ CSS optimized for production

Production Build

Old CSS way: you create a custom class and write CSS separately.

Use CDN for every production app

Tailwind way: you write ready-made utility classes directly in HTML.

Use Tailwind CLI/Vite/PostCSS build for production

Live Preview Output

npm run build โœ“ CSS optimized for production

Content Scan

Old CSS way: you create a custom class and write CSS separately.

Ship all CSS

Tailwind way: you write ready-made utility classes directly in HTML.

Configure content paths so unused CSS is removed

Live Preview Output

npm run build โœ“ CSS optimized for production
Level: Assessments

Mid-Term Practice Lab

Small UI challenge. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
Study the comparison examples below, then practice by editing classes in your HTML.

Old CSS vs New Tailwind Examples

Lab Task

Old CSS way: you create a custom class and write CSS separately.

Create CSS button, card and grid manually

Tailwind way: you write ready-made utility classes directly in HTML.

Recreate same UI using only Tailwind utilities

Live Preview Output

Student Task Preview

Create this type of responsive component and submit your code.

Requirement

Old CSS way: you create a custom class and write CSS separately.

Mobile broken layout

Tailwind way: you write ready-made utility classes directly in HTML.

Use sm:, md:, lg: breakpoints

Live Preview Output

Student Task Preview

Create this type of responsive component and submit your code.

Check

Old CSS way: you create a custom class and write CSS separately.

Only visual check

Tailwind way: you write ready-made utility classes directly in HTML.

Check spacing, states, accessibility and responsiveness

Live Preview Output

Student Task Preview

Create this type of responsive component and submit your code.

Level: Assessments

Final Capstone Project

Complete responsive landing page. Read the simple explanation, compare old CSS with Tailwind, then practice the same idea in your own project.

Easy meaning: Tailwind gives small ready-made classes. Instead of writing separate CSS every time, you combine classes like building blocks.
Study the comparison examples below, then practice by editing classes in your HTML.

Old CSS vs New Tailwind Examples

Capstone

Old CSS way: you create a custom class and write CSS separately.

One static desktop page

Tailwind way: you write ready-made utility classes directly in HTML.

Responsive landing page with hero, features, pricing, FAQ and footer

Live Preview Output

Build Modern Websites

Learn Tailwind with real UI examples.

Advanced Requirement

Old CSS way: you create a custom class and write CSS separately.

No dark mode

Tailwind way: you write ready-made utility classes directly in HTML.

Add dark mode classes and toggle

Live Preview Output

Student Task Preview

Create this type of responsive component and submit your code.

Submission

Old CSS way: you create a custom class and write CSS separately.

Screenshot only

Tailwind way: you write ready-made utility classes directly in HTML.

Submit HTML file plus notes explaining important classes

Live Preview Output

Student Task Preview

Create this type of responsive component and submit your code.

Level: Practical Website Blocks

Real Website Layout Examples: Old CSS vs New Tailwind CSS

This final practical section teaches common real-world layouts. Use the toggle switch to compare the old custom CSS method with the new Tailwind utility-class method. Use the tabs to switch between HTML code and CSS code.

Easy meaning: Old CSS needs separate class names and a separate stylesheet. Tailwind CSS keeps most design decisions inside the HTML using small readable classes like grid, gap-4, rounded-2xl, and md:grid-cols-3.

Responsive Gallery Layout

Learn how to build image/gallery grids for portfolio, product showcase, or media pages.

Old CSS New Tailwind

Live Preview Output

Preview

Modern Hero Section Layout

Hero sections are used at the top of landing pages to explain the main offer quickly.

Old CSS New Tailwind

Live Preview Output

Preview

Testimonial Cards Layout

Testimonials build trust. This layout is useful for course websites, service websites, and SaaS pages.

Old CSS New Tailwind

Live Preview Output

Preview

Product Details Page Layout

A product page usually needs image gallery, price, features, quantity, and add-to-cart button.

Old CSS New Tailwind

Live Preview Output

๐Ÿ“ฆ

Premium UI Kit

Tailwind Components Pack

Ready sections for ecommerce and landing pages.

โ‚น2,999

Complete Landing Page Layout

This combines navbar, hero, feature cards, testimonials, CTA, and footer in one real page example.

Old CSS New Tailwind

Live Preview Output

Become a Frontend Developer

Learn with practical examples.

Fast Learning
Live Projects
Certificate