Logo Jit-learn Start free
Primer / Resources / About

Learn the CSS basics before the work gets complicated.

This is a primer. Jit-CSS shows practical skills, small examples, and job-ready patterns.

Primer
What is CSS?

CSS means Cascading Style Sheets.

HTML puts words, links, images, buttons, and boxes on the page.
CSS decides how those things look.

CSS controls:
colors
fonts
spacing
borders
layout
hover effects
mobile screen changes

HTML is the thing. CSS is the look.

HTML says:
“This is a heading.”
“This is a paragraph.”
“This is a button.”

CSS says:
“Make the heading big.”
“Make the paragraph readable.”
“Make the button green and rounded.”

<h1 class="page_title">Welcome</h1>
A CSS rule has 2 main parts

A selector chooses the HTML.
A declaration changes how it looks.

The selector is before the curly braces.
The declarations are inside the curly braces.

h1 { color: red; font-size: 40px; }
Selectors choose what to style

A tag selector styles every matching tag.

A class selector starts with a dot.

An ID selector starts with a #.

p { color: black; } .warning { color: orange; } #top_banner { background: green; }
Classes are reusable

Classes are used again and again.

Use classes for cards, buttons, menus, boxes, warnings, and layouts.

<p class="warning">Check this first.</p> .warning { color: #9c3b1f; font-weight: bold; }
IDs are special

An ID should usually be used once on a page.

IDs are useful for important sections, anchors, and JavaScript targets.

<section id="lessons"> Lesson cards go here. </section> #lessons { padding: 40px 0; }
CSS changes spacing

Margin is space outside the box.

Padding is space inside the box.

Border is the line around the box.

.card { margin: 20px; padding: 18px; border: 1px solid #ddd; }
CSS changes layout

Layout means where things sit on the screen.

CSS can put cards beside each other, stack them, center them, or make them fit smaller screens.

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
CSS makes pages responsive

Responsive means the page works on desktop, tablet, and phone.

Media queries change the CSS when the screen gets smaller.

@media (max-width: 700px) { .grid { grid-template-columns: 1fr; } }
Why CSS matters

Without CSS, a page may still work, but it often looks plain and hard to use.

With CSS, the page becomes readable, organized, responsive, and easier to trust.

CSS turns content into a usable page.

Resources
About

About CSS

CSS stands for Cascading Style Sheets.

If HTML builds the house, CSS paints the walls, chooses the furniture, arranges the rooms, and makes everything look good.

Without CSS, web pages still work, but they often look plain, crowded, and difficult to use.

With CSS, pages become colorful, organized, readable, responsive, and much easier for people to understand.

CSS controls things like:
✓ Colors
✓ Fonts
✓ Spacing
✓ Borders
✓ Layout
✓ Menus
✓ Buttons
✓ Cards
✓ Animations
✓ Mobile-friendly designs

The word Cascading is important. A page may receive styles from several places at the same time: a browser, a CSS file, a style section, or even directly inside an HTML tag.

CSS has rules that decide which style wins when multiple styles try to change the same thing.

CSS can be added in three common ways:

  • Inline CSS — directly inside an HTML tag.
  • Internal CSS — inside a <style> section.
  • External CSS — stored in a separate .css file.

Most professional websites use external CSS because one stylesheet can control hundreds or even thousands of pages.

CSS uses selectors to choose what should be styled. A selector might target:

  • Every paragraph
  • A specific class
  • A specific ID
  • A form field
  • A button being hovered by the mouse

Modern websites also rely heavily on CSS frameworks such as Bootstrap, Tailwind CSS, Foundation, and Pure CSS to speed up development.

One of the biggest advantages of CSS is that styles can be reused. Change one rule and hundreds of pages can instantly update.

CSS also makes responsive design possible, allowing a website to work on desktops, tablets, laptops, and phones without creating separate websites.

Like any skill, CSS takes practice. Concepts such as the box model, layouts, positioning, specificity, animations, and debugging may seem confusing at first.

The goal of Jit-CSS is not to memorize definitions. The goal is to learn how real websites are built, styled, maintained, and improved one practical step at a time.

Why Jit-CSS Exists

The real skills of 2025-2030 are: Can you control layout, spacing, color, motion, and responsive behavior without guessing?

Why Jit-CSS Exists

CSS is the visual and layout layer of the web.

Every visible page depends on styling: selectors, spacing, layout, responsive rules, colors, typography, buttons, cards, animation, and practical debugging.

This is a primer. Jit-CSS shows the practical skills behind page structure, not just terms copied from a list.

Primer / Resources / About

Learn the CSS basics before the work gets complicated.

This is a primer. Jit-CSS shows practical skills, small examples, and job-ready patterns.

What is CSS?

CSS means Cascading Style Sheets.

HTML puts words, links, images, buttons, and boxes on the page.
CSS decides how those things look.

CSS controls:
colors
fonts
spacing
borders
layout
hover effects
mobile screen changes

HTML is the thing. CSS is the look.

HTML says:
“This is a heading.”
“This is a paragraph.”
“This is a button.”

CSS says:
“Make the heading big.”
“Make the paragraph readable.”
“Make the button green and rounded.”

<h1 class="page_title">Welcome</h1>
A CSS rule has 2 main parts

A selector chooses the HTML.
A declaration changes how it looks.

The selector is before the curly braces.
The declarations are inside the curly braces.

h1 { color: red; font-size: 40px; }
Selectors choose what to style

A tag selector styles every matching tag.

A class selector starts with a dot.

An ID selector starts with a #.

p { color: black; } .warning { color: orange; } #top_banner { background: green; }
Classes are reusable

Classes are used again and again.

Use classes for cards, buttons, menus, boxes, warnings, and layouts.

<p class="warning">Check this first.</p> .warning { color: #9c3b1f; font-weight: bold; }
IDs are special

An ID should usually be used once on a page.

IDs are useful for important sections, anchors, and JavaScript targets.

<section id="lessons"> Lesson cards go here. </section> #lessons { padding: 40px 0; }
CSS changes spacing

Margin is space outside the box.

Padding is space inside the box.

Border is the line around the box.

.card { margin: 20px; padding: 18px; border: 1px solid #ddd; }
CSS changes layout

Layout means where things sit on the screen.

CSS can put cards beside each other, stack them, center them, or make them fit smaller screens.

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
CSS makes pages responsive

Responsive means the page works on desktop, tablet, and phone.

Media queries change the CSS when the screen gets smaller.

@media (max-width: 700px) { .grid { grid-template-columns: 1fr; } }
Why CSS matters

Without CSS, a page may still work, but it often looks plain and hard to use.

With CSS, the page becomes readable, organized, responsive, and easier to trust.

CSS turns content into a usable page.

About CSS

CSS stands for Cascading Style Sheets.

If HTML builds the house, CSS paints the walls, chooses the furniture, arranges the rooms, and makes everything look good.

Without CSS, web pages still work, but they often look plain, crowded, and difficult to use.

With CSS, pages become colorful, organized, readable, responsive, and much easier for people to understand.

CSS controls things like:
✓ Colors
✓ Fonts
✓ Spacing
✓ Borders
✓ Layout
✓ Menus
✓ Buttons
✓ Cards
✓ Animations
✓ Mobile-friendly designs

The word Cascading is important. A page may receive styles from several places at the same time: a browser, a CSS file, a style section, or even directly inside an HTML tag.

CSS has rules that decide which style wins when multiple styles try to change the same thing.

CSS can be added in three common ways:

  • Inline CSS — directly inside an HTML tag.
  • Internal CSS — inside a <style> section.
  • External CSS — stored in a separate .css file.

Most professional websites use external CSS because one stylesheet can control hundreds or even thousands of pages.

CSS uses selectors to choose what should be styled. A selector might target:

  • Every paragraph
  • A specific class
  • A specific ID
  • A form field
  • A button being hovered by the mouse

Modern websites also rely heavily on CSS frameworks such as Bootstrap, Tailwind CSS, Foundation, and Pure CSS to speed up development.

One of the biggest advantages of CSS is that styles can be reused. Change one rule and hundreds of pages can instantly update.

CSS also makes responsive design possible, allowing a website to work on desktops, tablets, laptops, and phones without creating separate websites.

Like any skill, CSS takes practice. Concepts such as the box model, layouts, positioning, specificity, animations, and debugging may seem confusing at first.

The goal of Jit-CSS is not to memorize definitions. The goal is to learn how real websites are built, styled, maintained, and improved one practical step at a time.

Lecture + worksheet

Job-ready CSS practice cards

Each card has one clear goal. The whole card opens the lecture.

✓ Lesson 1 Free • No Login Required

A Complete CSS Stylesheet

See every part of a real CSS file in one place — a reference point for everything discussed in this series.

Returned to again and again as you work through the course. Bookmark it.
Complete stylesheet: every section in context
Isolated examples: pieces without the whole
Includes:
  • selectors
  • properties
  • values
  • cascade
  • full page example

Tell CSS exactly what to style

Use selectors to target elements, classes, IDs, and combinations without guessing.

Seen in every stylesheet ever written — the foundation of all CSS decisions.
CSS direct: precise targeting
No-selector version: styles land in the wrong place
Includes:
  • element selector
  • class selector
  • ID selector
  • descendant
  • specificity basics

Understand how space works around every element

Master the box model so padding, margin, and border behave the way you expect.

Seen every time an element does not line up, overlap, or space correctly on a page.
CSS direct: predictable spacing
No-box-model version: layouts break unexpectedly
Includes:
  • margin
  • padding
  • border
  • width
  • box-sizing

Control how text looks and reads

Set fonts, sizes, weights, line height, and spacing so text is readable on every screen.

Seen on every page — text is 90% of the web and CSS controls all of it.
CSS direct: readable professional text
Default version: browser fonts, no control
Includes:
  • font-family
  • font-size
  • font-weight
  • line-height
  • letter-spacing

Apply color to text, backgrounds, and borders

Use color values correctly so pages look intentional and consistent.

Seen in every design decision — color is the first thing visitors notice and the first thing that breaks trust.
CSS direct: consistent color system
No-color version: browser defaults, no identity
Includes:
  • color
  • background-color
  • hex values
  • rgb and rgba
  • CSS variables

Arrange elements in rows and columns without fighting the browser

Use flexbox to build navigation bars, card rows, centered content, and simple layouts.

Seen in navigation bars, card grids, footers, hero sections, and almost every modern layout.
CSS direct: controlled flexible layout
Float version: layout breaks on different screens
Includes:
  • display flex
  • flex-direction
  • justify-content
  • align-items
  • gap

Build two-dimensional page layouts with CSS Grid

Use grid to place elements in rows and columns at the same time.

Seen in full page layouts, dashboards, image galleries, and any design with rows AND columns.
CSS direct: precise two-axis control
Flexbox-only version: one axis at a time
Includes:
  • display grid
  • grid-template-columns
  • grid-template-rows
  • gap
  • grid-column span

Make pages look right on phones, tablets, and desktops

Use media queries to adjust layout and size at different screen widths.

Seen on every site — more than 60% of web traffic now comes from phones.
CSS direct: layout adapts to screen
Fixed-width version: broken on mobile
Includes:
  • media queries
  • breakpoints
  • mobile first
  • max-width
  • min-width

Control exactly where elements sit on the page

Use position to place elements precisely — sticky headers, floating buttons, overlays.

Seen in sticky navigation, modals, tooltips, fixed footers, and overlapping elements.
CSS direct: intentional placement
Static-only version: elements stack in document order only
Includes:
  • position static
  • position relative
  • position absolute
  • position fixed
  • z-index

Add smooth movement without JavaScript

Use transitions and keyframe animations to make interfaces feel alive and responsive.

Seen in hover effects, button feedback, loading states, and page reveals.
CSS direct: smooth polished interactions
No-transition version: jarring instant changes
Includes:
  • transition
  • transition-duration
  • keyframes
  • animation
  • transform

Build a consistent visual system with CSS custom properties

Use CSS variables to define colors, sizes, and spacing once and use them everywhere.

Seen in professional stylesheets, design systems, and any site that needs consistent branding.
CSS direct: change one value, update everywhere
Hardcoded version: change the same color in 40 places
Includes:
  • custom properties
  • var()
  • :root
  • design tokens
  • theme switching
Ready

moc.rt-tij [ta] troppus
(customization available)