Home / Courses / CSS Mastery: From Beginner to Advanced …
Frontend & UI
CSS Mastery: From Beginner to Advanced Responsive Design
A complete CSS learning path covering selectors, the cascade, layout, Flexbox, Grid, responsive design, custom properties, animation, accessibility, debugging and production-ready UI projects.
Bigyan Ghimire
Beginner
30+ hours
11 modules
57 views
This course progresses from CSS fundamentals to modern layout systems and maintainable interface design. Each lesson includes a concept explanation, a practical stylesheet example, expected visual behaviour and a focused exercise.
You will build reusable components, responsive layouts and a complete landing page while learning how to debug CSS, respect accessibility preferences and keep styles organized as a project grows.
What You'll Learn
Understand the cascade, specificity and inheritance
Style typography, color, spacing and components consistently
Master box model, positioning, Flexbox and CSS Grid
Build responsive layouts with modern CSS
Create transitions, animations and accessible states
Organize maintainable styles and ship polished projects
Requirements
Basic HTML knowledge
A modern browser and code editor
No previous CSS experience required
Module 01 of 11
CSS Foundations and Setup
Connect a stylesheet and understand how browser styling works.
Connect a stylesheet and understand how browser styling works.
Work through each lesson in order. Run the examples in your own browser or editor, then complete the practice task before moving on.
In This Module
Lesson 1.1 · Module 01
What CSS Does
Learn the role of CSS and how style rules are applied.
What you will learn
Learn the role of CSS and how style rules are applied.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
A CSS rule contains a selector and declaration block. Each declaration combines a property and value. Browsers combine author styles with user-agent styles and other applicable rules.
Code example
p { color: #1f2937; font-size: 1rem; }
Expected result
Style a paragraph and inspect the computed styles.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 1.2 · Module 01
Inline, Internal and External CSS
Compare stylesheet placement and use an external file for maintainability.
What you will learn
Compare stylesheet placement and use an external file for maintainability.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
External stylesheets can be reused and cached. Keep presentation separate from content where practical and link the stylesheet from head.
Code example
<link rel="stylesheet" href="css/styles.css">
Expected result
Move three inline styles into styles.css.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 1.3 · Module 01
CSS Syntax, Comments and Values
Learn declarations, units, colors, functions and comments.
What you will learn
Learn declarations, units, colors, functions and comments.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
CSS values include keywords, lengths, percentages, colors and functions such as calc() and clamp(). Invalid declarations are generally ignored.
Code example
/* Main page text */\nbody { color: #222; margin: 0; }
Expected result
Try px, rem, %, rgb() and hex values.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 1.4 · Module 01
Browser DevTools and CSS Debugging
Inspect computed values and identify overridden declarations.
What you will learn
Inspect computed values and identify overridden declarations.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Use the Styles and Computed panels to see which declarations apply, which are overridden and which fail to parse. Test one change at a time.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Module 02 of 11
Selectors, Cascade and Specificity
Target elements predictably without fragile selector chains.
Target elements predictably without fragile selector chains.
Work through each lesson in order. Run the examples in your own browser or editor, then complete the practice task before moving on.
In This Module
Lesson 2.1 · Module 02
Element, Class, ID and Group Selectors
Select elements using type, class, ID and comma-separated groups.
What you will learn
Select elements using type, class, ID and comma-separated groups.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Classes are reusable and usually preferable for styling. IDs should be unique within a document. Group selectors apply the same declarations to multiple targets.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 2.2 · Module 02
Combinators and Attribute Selectors
Use descendant, child, sibling and attribute selectors appropriately.
What you will learn
Use descendant, child, sibling and attribute selectors appropriately.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Combinators express relationships in the DOM. Attribute selectors can target elements based on attribute presence or value.
Code example
nav a { text-decoration: none; }\nform input[type="email"] { width: 100%; }
Expected result
Style nested navigation and email inputs.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 2.3 · Module 02
Pseudo-classes and Pseudo-elements
Use hover, focus, checked, first-child, before and after.
What you will learn
Use hover, focus, checked, first-child, before and after.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Pseudo-classes select elements in a state or position. Pseudo-elements style generated or specific parts of elements. Keep essential content in the document rather than relying on generated content.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 2.4 · Module 02
Cascade Layers, Specificity and Inheritance
Resolve conflicts with source order, specificity, importance and layers.
What you will learn
Resolve conflicts with source order, specificity, importance and layers.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
The cascade considers origin, importance, layers, specificity and order. Prefer simple class-based rules over escalating specificity or repeated !important declarations.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Module 03 of 11
Colors, Typography and Visual Design
Create readable, consistent interfaces with deliberate visual hierarchy.
Create readable, consistent interfaces with deliberate visual hierarchy.
Work through each lesson in order. Run the examples in your own browser or editor, then complete the practice task before moving on.
In This Module
Lesson 3.1 · Module 03
Color Formats and Contrast
Use named colors, hex, RGB, HSL and custom properties.
What you will learn
Use named colors, hex, RGB, HSL and custom properties.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Contrast affects readability. Do not communicate meaning through color alone; combine color with text, icons or patterns where appropriate.
Choose text and background colors and check contrast.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 3.2 · Module 03
Font Families, Size and Line Height
Build readable type scales with system and web fonts.
What you will learn
Build readable type scales with system and web fonts.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Use a sensible font stack and line height. rem-based sizing helps scale typography consistently; load external fonts thoughtfully to avoid performance penalties.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 3.3 · Module 03
Spacing, Borders, Shadows and Radius
Establish consistent spacing and component surfaces.
What you will learn
Establish consistent spacing and component surfaces.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
A spacing scale makes a site feel coherent. Shadows and borders should communicate hierarchy rather than decorate every element equally.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 3.4 · Module 03
CSS Custom Properties and Design Tokens
Define reusable values and override them by theme or component.
What you will learn
Define reusable values and override them by theme or component.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Custom properties participate in the cascade and can be updated at runtime. Name tokens by purpose rather than by a temporary visual value.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Module 04 of 11
Box Model, Sizing and Overflow
Control element dimensions, spacing and content flow.
Control element dimensions, spacing and content flow.
Work through each lesson in order. Run the examples in your own browser or editor, then complete the practice task before moving on.
In This Module
Lesson 4.1 · Module 04
Content, Padding, Border and Margin
Understand the box model and box-sizing.
What you will learn
Understand the box model and box-sizing.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
With content-box, width applies to content; with border-box, it includes padding and border. A global border-box rule makes sizing more predictable.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 4.2 · Module 04
Width, Min/Max Size and Intrinsic Sizing
Use min-width, max-width, min-content, max-content and fit-content.
What you will learn
Use min-width, max-width, min-content, max-content and fit-content.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Intrinsic sizing lets content influence layout. max-width is useful for readable content containers, while min-width: 0 can allow flex and grid children to shrink.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 4.3 · Module 04
Margin Collapse and Spacing Patterns
Understand vertical margin collapse and choose layout spacing tools.
What you will learn
Understand vertical margin collapse and choose layout spacing tools.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Adjacent block margins may collapse in specific conditions. Gap in Flexbox and Grid is often more predictable for spacing siblings.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 4.4 · Module 04
Overflow, Visibility and Display
Choose display, overflow, visibility and opacity carefully.
What you will learn
Choose display, overflow, visibility and opacity carefully.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
display controls layout participation; visibility hides an element while retaining its layout space; opacity changes transparency but does not remove keyboard focus. Overflow should be intentional.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Module 05 of 11
Positioning and Layering
Place elements with normal flow, positioning and stacking contexts.
Place elements with normal flow, positioning and stacking contexts.
Work through each lesson in order. Run the examples in your own browser or editor, then complete the practice task before moving on.
In This Module
Lesson 5.1 · Module 05
Normal Flow and Position Values
Understand static, relative, absolute, fixed and sticky positioning.
What you will learn
Understand static, relative, absolute, fixed and sticky positioning.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Absolute elements are positioned relative to a containing block. Sticky positioning depends on scroll containers and inset values. Avoid removing content from normal flow without a clear reason.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 5.2 · Module 05
z-index and Stacking Contexts
Understand why z-index sometimes appears not to work.
What you will learn
Understand why z-index sometimes appears not to work.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Stacking contexts can be created by positioned elements with z-index and by several other properties. A large z-index cannot escape its parent stacking context.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 5.3 · Module 05
Sticky Headers and Fixed Controls
Create sticky navigation and fixed utility controls responsibly.
What you will learn
Create sticky navigation and fixed utility controls responsibly.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Fixed controls can cover content, particularly on mobile. Account for safe areas and ensure the page remains usable at zoomed text sizes.
Test a sticky header and a fixed button on a narrow screen.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 5.4 · Module 05
Float, Clear and Modern Alternatives
Recognize legacy float layouts and use modern layout tools for new work.
What you will learn
Recognize legacy float layouts and use modern layout tools for new work.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Float remains useful for wrapping text around images, but Flexbox and Grid are generally better for application layout.
Wrap article text around an image and compare with Grid.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Module 06 of 11
Flexbox Layout Mastery
Arrange items along one dimension and manage flexible space.
Arrange items along one dimension and manage flexible space.
Work through each lesson in order. Run the examples in your own browser or editor, then complete the practice task before moving on.
In This Module
Lesson 6.1 · Module 06
Flex Container and Main/Cross Axes
Use display:flex, flex-direction, justify-content and align-items.
What you will learn
Use display:flex, flex-direction, justify-content and align-items.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Flexbox is designed for one-dimensional layout. The main axis follows flex-direction, while the cross axis is perpendicular to it.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 6.2 · Module 06
flex-grow, flex-shrink and flex-basis
Understand how flex items divide available space.
What you will learn
Understand how flex items divide available space.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
The flex shorthand combines growth, shrinkage and basis. A sensible basis helps define starting sizes before free space is distributed.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 6.3 · Module 06
Wrapping, Gap and Alignment
Use flex-wrap, align-content, order and gap carefully.
What you will learn
Use flex-wrap, align-content, order and gap carefully.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Wrapping creates additional flex lines when space is insufficient. Avoid changing visual order in a way that conflicts with the DOM reading order.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 6.4 · Module 06
Responsive Navigation with Flexbox
Build navigation that adapts across available widths.
What you will learn
Build navigation that adapts across available widths.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Prefer natural wrapping or a deliberate mobile navigation pattern. If using a JavaScript toggle, ensure its state and accessible label are exposed.
Build a navigation row that remains usable on mobile.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Module 07 of 11
CSS Grid Layout Mastery
Create two-dimensional layouts for galleries, dashboards and page structures.
Create two-dimensional layouts for galleries, dashboards and page structures.
Work through each lesson in order. Run the examples in your own browser or editor, then complete the practice task before moving on.
In This Module
Lesson 7.1 · Module 07
Grid Tracks, Columns and Rows
Use grid-template-columns, rows, gap and fr units.
What you will learn
Use grid-template-columns, rows, gap and fr units.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Grid defines rows and columns simultaneously. Fractional units distribute available space after fixed and intrinsic sizing considerations.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 7.2 · Module 07
repeat, minmax and auto-fit
Build fluid grids that adapt without many breakpoints.
What you will learn
Build fluid grids that adapt without many breakpoints.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
minmax() sets track bounds, and auto-fit or auto-fill can repeat tracks based on available space. Test content that has long words or wide images.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 7.3 · Module 07
Grid Areas and Item Placement
Name page regions and position items across tracks.
What you will learn
Name page regions and position items across tracks.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Named grid areas make complex layouts easier to understand. Keep the visual placement aligned with a logical reading order.
Build a dashboard shell using grid-template-areas.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 7.4 · Module 07
Flexbox or Grid: Choosing the Right Tool
Choose layout systems based on one-dimensional or two-dimensional needs.
What you will learn
Choose layout systems based on one-dimensional or two-dimensional needs.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Flexbox is often ideal for a row of controls or navigation. Grid is strong for aligned rows and columns. They can be nested together rather than treated as competitors.
Rebuild a card dashboard and justify the layout choice.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Module 08 of 11
Responsive Design and Modern CSS
Support different viewports, user preferences and content sizes.
Support different viewports, user preferences and content sizes.
Work through each lesson in order. Run the examples in your own browser or editor, then complete the practice task before moving on.
In This Module
Lesson 8.1 · Module 08
Mobile-First Media Queries
Write base styles for small screens and add enhancements at content-driven breakpoints.
What you will learn
Write base styles for small screens and add enhancements at content-driven breakpoints.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Breakpoints should be chosen where the content needs them, not solely to match particular device names. Test zoom and intermediate widths.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 8.2 · Module 08
Fluid Type and Spacing with clamp
Use clamp, min, max and viewport units for fluid sizing.
What you will learn
Use clamp, min, max and viewport units for fluid sizing.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
clamp() sets a minimum, preferred value and maximum. Ensure text remains readable at high zoom and does not grow excessively on large screens.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 8.3 · Module 08
Container Queries and Responsive Components
Adapt components to their container rather than only the viewport.
What you will learn
Adapt components to their container rather than only the viewport.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Container queries let a component change when its containing area changes. Set an appropriate containment context and retain sensible fallback styles.
Make a profile card adapt inside different page columns.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 8.4 · Module 08
Responsive Images, Reduced Motion and Preferences
Use media features for motion, contrast and theme preferences.
What you will learn
Use media features for motion, contrast and theme preferences.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Respect prefers-reduced-motion and test dark-mode or contrast preferences where your design supports them. CSS should enhance accessibility rather than override user needs.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Module 09 of 11
Transitions, Transforms and Animation
Add feedback and motion without making interfaces harder to use.
Add feedback and motion without making interfaces harder to use.
Work through each lesson in order. Run the examples in your own browser or editor, then complete the practice task before moving on.
In This Module
Lesson 9.1 · Module 09
Transitions and Easing
Animate changes to selected properties with transition.
What you will learn
Animate changes to selected properties with transition.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Transition only properties that need feedback. Avoid animating layout-heavy properties when transforms or opacity can achieve the same effect more smoothly.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 9.2 · Module 09
2D Transforms and Transform Origin
Use translate, scale, rotate and transform-origin.
What you will learn
Use translate, scale, rotate and transform-origin.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Transforms change visual rendering without changing normal-flow space. Ensure transformed content does not overlap nearby content or become hard to interact with.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 9.3 · Module 09
Keyframes and Animation Properties
Define keyframe sequences and control duration, iteration and fill mode.
What you will learn
Define keyframe sequences and control duration, iteration and fill mode.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Use animation for meaningful, restrained effects. Avoid infinite movement that distracts users, and respect reduced-motion preferences.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 9.4 · Module 09
Motion Accessibility and Performance
Review animation duration, motion sensitivity and compositing.
What you will learn
Review animation duration, motion sensitivity and compositing.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Large animated shadows and layout changes can be expensive. Keep motion purposeful, brief and optional when it may cause discomfort.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Module 10 of 11
Maintainable CSS, Architecture and Quality
Organize CSS for long-term projects and troubleshoot real layouts.
Organize CSS for long-term projects and troubleshoot real layouts.
Work through each lesson in order. Run the examples in your own browser or editor, then complete the practice task before moving on.
In This Module
Lesson 10.1 · Module 10
BEM and Component Naming
Use clear class names that describe components and their parts.
What you will learn
Use clear class names that describe components and their parts.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
BEM is one naming convention, not a browser requirement. Consistent naming makes styles easier to locate and reduces accidental coupling.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 10.2 · Module 10
Organizing Files and Managing CSS Growth
Split base, layout, component and utility styles logically.
What you will learn
Split base, layout, component and utility styles logically.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Keep the architecture appropriate to project size. Avoid excessive file fragmentation for a small site, but separate repeated component patterns as they grow.
Organize a growing stylesheet and document imports.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 10.3 · Module 10
Specificity Debugging and Browser Compatibility
Find layout bugs using computed styles and feature support checks.
What you will learn
Find layout bugs using computed styles and feature support checks.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Check whether a declaration is overridden, invalid or unsupported. Use progressive enhancement and test the browsers your audience uses.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 10.4 · Module 10
Accessibility, Performance and Final CSS Audit
Check contrast, focus visibility, overflow, motion and responsive behaviour.
What you will learn
Check contrast, focus visibility, overflow, motion and responsive behaviour.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Quality includes usability, maintainability and performance. Validate at zoom, keyboard navigation and narrow widths before publishing.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Module 11 of 11
Professional Projects and Portfolio Delivery
Apply CSS skills to real interface patterns and a complete final project.
Apply CSS skills to real interface patterns and a complete final project.
Work through each lesson in order. Run the examples in your own browser or editor, then complete the practice task before moving on.
In This Module
Lesson 11.1 · Module 11
Project 1: Responsive Profile and Portfolio Card
Build a reusable profile card with image, text, links and small-screen layout.
What you will learn
Build a reusable profile card with image, text, links and small-screen layout.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Start with semantic HTML and a clear visual hierarchy. Use Grid or Flexbox for layout and custom properties for consistent spacing and colors.
Finish a profile card that works at 320px and desktop widths.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 11.2 · Module 11
Project 2: Pricing Table and Feature Comparison
Design readable pricing cards with accessible action states.
What you will learn
Design readable pricing cards with accessible action states.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Clearly distinguish plan features and pricing. Do not rely on color alone to identify a recommended plan; include a text label when needed.
Build three pricing cards and test long feature lists.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 11.3 · Module 11
Project 3: Responsive Dashboard UI
Create a sidebar, top navigation, stat cards and content grid.
What you will learn
Create a sidebar, top navigation, stat cards and content grid.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Use Grid for the main shell and component-level Flexbox for card controls. Test overflow, long labels and keyboard focus.
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Lesson 11.4 · Module 11
Final Project: Premium Responsive Landing Page
Combine typography, tokens, grid, interactions and accessibility into one polished page.
What you will learn
Combine typography, tokens, grid, interactions and accessibility into one polished page.
Recognize when and why to use this technique.
Apply it in a small practical task.
Explanation
Deliver a consistent design system, responsive hero, feature cards, testimonials, FAQ and footer. Test real content and avoid placeholder links before publishing.
Publish the landing page and include screenshots plus a self-review.
Practice task
Recreate the example without copying it line by line. Change at least one value, test the result, and write a short note explaining what changed and why. Check your work in the browser or runtime and fix any errors before continuing.
Key takeaway
Understand the purpose of the feature, use meaningful names, keep the code readable, and test both the expected case and a realistic edge case.
Your Instructor
Instructor
Bigyan Ghimire
Full-Stack Developer
Full-stack web developer from Kathmandu, Nepal, specialising in PHP, JavaScript and MySQL.