Week 2

Introduction to CSS

CSS Layouts

Responsive CSS

Accessible styling

Practice

Assignment

Back to Track

Content

Let’s get practical

Exercise 1: Style Your Portfolio

Difficulty: Easy Concept: CSS syntax, selectors, typography, colors, spacing, external stylesheets

Take the personal portfolio page you built in Week 1 and bring it to life with CSS.

Requirements:

*, *::before, *::after {
    box-sizing: border-box;
  }

Hints:

Exercise 2: CSS Grid Garden + Flexbox Froggy

Difficulty: Easy Concept: Flexbox alignment, Grid placement

Before building layouts from scratch, spend 15 minutes getting the alignment properties into muscle memory through two games.

Requirements:

After finishing both, write down your answers to these three questions in a comment block at the top of your styles.css from Exercise 1:

Exercise 3: Accessibility Audit

Difficulty: Easy/Medium Concept: Focus states, color contrast, keyboard navigation, accessible styling

Go back to your portfolio from Exercise 1 and audit it for accessibility. Most issues take one or two lines of CSS to fix.

Requirements:

Add prefers-reduced-motion handling if you added any transitions or hover animations in Exercise 1:

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      transition-duration: 0.01ms;
    }
  }

Install the axe DevTools extension (free) and run it on your portfolio. Fix any issues it flags

Hints:


The HackYourFuture curriculum is licensed under CC BY-NC-SA 4.0

CC BY-NC-SA 4.0 Icons

*https://hackyourfuture.net/*

Found a mistake or have a suggestion? Let us know in the feedback form.