Internet Programming Laboratory

Unit 3: CSS3 & Modern Layouts

Selectors, Specificity, Box Model, Flexbox, Grid, CSS Variables, Typography, Responsive Design, Transitions & Animations โ€” the visual layer that turns HTML skeletons into stunning, production-ready interfaces.

๐Ÿข Industry-Aligned  |  ๐Ÿ“ 15 MCQs (Bloom's Taxonomy)  |  ๐Ÿ”ฌ 5 Lab Exercises  |  ๐Ÿ’ผ Interview Prep

Section 1

Why This Chapter Matters in 2025

HTML gives you the skeleton. CSS gives you the skin, clothes, and personality. Without CSS, every website on earth would look like a plain text document from 1995. The difference between a โ‚น500/month freelancer and a โ‚น15 LPA frontend engineer? Mastery of CSS layout, responsiveness, and modern design patterns.

Here's a reality check: Flexbox and CSS Grid are now used in 97% of production websites worldwide. If you still use float: left to build layouts in 2025, your code will be rejected in every company code review.

๐Ÿข Industry Connection โ€” Who Relies on CSS3 in Production?

CRED โ€” their dark-themed, glassmorphic UI? Every gradient, every smooth card hover, every subtle animation is pure CSS3. Their design team writes CSS Variables for the entire theme system โ€” change one variable, the whole app changes.

Swiggy โ€” their restaurant grid? CSS Grid. Their mobile menu? Flexbox. Their "Add to Cart" animation? CSS @keyframes. Swiggy's frontend team rejected float-based layouts in 2018.

Zerodha (Kite) โ€” India's largest stock trading platform. Their real-time trading dashboard uses CSS Grid for the multi-panel layout, CSS Variables for light/dark theme switching, and media queries for tablet-to-desktop responsiveness. Zero JavaScript for layout.

๐Ÿ‡ฎ๐Ÿ‡ณ CRED๐Ÿ‡ฎ๐Ÿ‡ณ Swiggy๐Ÿ‡ฎ๐Ÿ‡ณ Zerodha๐Ÿ‡ฎ๐Ÿ‡ณ Flipkart๐Ÿ‡ฎ๐Ÿ‡ณ Razorpay

Prerequisite Checklist โœ…

  • โœ… Completed Unit 1 & 2 (HTML5 fundamentals โ€” you need elements to style)
  • โœ… VS Code with the Live Server extension installed (instant preview on save)
  • โœ… Chrome DevTools โ€” you'll live in the "Elements โ†’ Styles" panel this entire unit
  • โœ… Basic understanding of HTML tags, classes, and IDs
The first CSS specification was proposed by Hรฅkon Wium Lie in 1994. Before CSS, developers used HTML <font> tags and <table> layouts. A single colour change required editing every page manually. CSS changed everything โ€” one stylesheet, one change, every page updated.
Section 2

Learning Outcomes โ€” Bloom's Taxonomy

Bloom's LevelLearning Outcome
L1 โ€” RememberRecall the syntax for CSS rules, selectors (type, class, id, attribute, pseudo-class, pseudo-element), and the box model components
L2 โ€” UnderstandExplain how CSS specificity and the cascade determine which styles are applied when rules conflict
L3 โ€” ApplyBuild responsive layouts using Flexbox and CSS Grid, apply Google Fonts, and implement CSS Variables for a design system
L4 โ€” AnalyzeDebug layout issues using Chrome DevTools โ€” inspect computed box model, identify specificity conflicts, and diagnose overflow problems
L5 โ€” EvaluateCompare Flexbox vs Grid for a given layout requirement and justify which approach is more maintainable and performant
L6 โ€” CreateDesign and implement a complete, responsive, themed landing page for an Indian startup using CSS3, Flexbox, Grid, variables, and animations