Day 1

HTML, CSS &
Web Fundamentals

Build What You See

Watch a plain HTML page transform into a modern website — interactively.

My Website

Welcome to my page. This is a simple website built with HTML.

Stage: HTML

Let's Start With a Question

What is the worst website
you have ever seen?

Think about it... we've all seen some truly terrible ones.

What Makes a Website Beautiful?

The difference between 'meh' and 'wow' is just a few principles.

94%

of first impressions are design-related

🚪
88%

of users won't return after a bad experience

⏱️
3.8s

is all you get to make a first impression

🏆
75%

of credibility comes from website design

Why Do We Need Good Frontend?

Your backend can be the fastest in the world, your database perfectly normalized, your API flawless — but if your frontend looks like it was built in 2004, nobody will trust it. Frontend is the first and last thing a user sees. It's your handshake, your outfit, your first impression.

The 5 Principles of Beautiful Design

👁️

Visual Hierarchy

Guide the eye. Big = important. Small = secondary. People scan, they don't read.

Bad

Everything the same size, nothing stands out.

Good

Clear headings, supporting text, obvious CTA.

A Real-World Example

See all 5 principles applied in one design.

beautiful-design-example.com
Example of a beautifully designed website

Notice the clean hierarchy, generous whitespace, minimal color palette, and consistent spacing. This is what CSS mastery looks like.

How The Web Works

Click each step to see what happens when you visit a website.

Everything you see on any website — every button, card, image — is built with what we'll learn today.

Watch a Website Come to Life

Toggle each stage to see how CSS transforms raw HTML into a modern page.

My Website

Welcome to my page. This is a simple website built with HTML and CSS.

  • About
  • Projects
  • Contact
Raw HTML — no styling at all. The browser's default rendering.
html
1<body>
2 <h1>My Website</h1>
3 <p>Welcome to my page.</p>
4 <ul>
5 <li>About</li>
6 <li>Projects</li>
7 <li>Contact</li>
8 </ul>
9 <button>Click me</button>
10</body>

HTML — The DOM Tree

Hover any element in the tree to highlight the corresponding HTML code.

HTML
1<html>
2 <head>
3 <title>My Page</title>
4 <link rel="stylesheet" href="style.css">
5 </head>
6 <body>
7 <header>
8 <h1>Welcome</h1>
9 <nav>Home | About</nav>
10 </header>
11 <main>
12 <p>Hello world!</p>
13 <img src="photo.jpg" alt="Photo">
14 </main>
15 <footer>
16 <p>&copy; 2025</p>
17 </footer>
18 </body>
19</html>

HTML Tags You Need to Know

There are 100+ HTML tags. You'll use about 20 regularly. Let's meet them.

✍️ Text & Headings

<h1–h6>Headings

index.html
<h1>I'm the biggest</h1>
<h2>I'm pretty big</h2>
<h3>Medium vibes</h3>
<h4>Getting smaller</h4>
<h5>Almost invisible</h5>
<h6>Why do I even exist?</h6>

Quick math: You just learned 14 tags across 5 categories.

That's 90% of what professional developers use daily. The other 100+ tags? You'll Google them when you need them. That's literally how it works.

✍️

Practice — HTML Tags

Try these in VS Code before peeking at the answer

HTML is like building with LEGO blocks. Each tag is a different shaped block.

Semantic HTML — The Right Way

"You can build everything with <div>, but you SHOULDN'T."

"Using semantic tags is like labeling boxes when you move house. Sure, everything fits in any box — but 'Kitchen Stuff' is a lot more helpful than 'Box #47'."

🏠
<div> at the top<header>

Browser knows it's the header

🧭
<div> for links<nav>

Screen readers find navigation

📄
<div> for content<main>

Search engines know the important stuff

📎
<div> at the bottom<footer>

Proper document structure

📰
<div> for a post<article>

Each piece of independent content

📦
<div> for a group<section>

Thematic grouping

✍️

Practice — Semantic HTML

Try these in VS Code before peeking at the answer

Class & ID — Naming Your Elements

"Class is a name tag at a conference. ID is a social security number — unique to one person."

🎒

Class .className

Reusable — many elements can share it

Can be used on multiple elements
An element can have multiple classes
Selected with a dot: .card
Use for styling — this is your daily driver
HTML
<div class="card">Card 1</div>
<div class="card">Card 2</div>
<div class="card">Card 3</div>

<!-- ALL three get styled! -->
CSS
.card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
}

Like a school uniform — everyone in the class wears the same thing

🎯

ID #uniqueName

Unique — only ONE element can have it

Must be unique on the page
An element can only have one ID
Selected with a hash: #hero
Use for JavaScript targeting & anchors
HTML
<div id="hero-banner">
  Welcome!
</div>

<!-- Only ONE element with
     this ID on the page! -->
CSS
#hero-banner {
  background: orange;
  font-size: 2rem;
  text-align: center;
}

Like a passport number — unique to one person only

💡 The golden rule: Use .class for styling (99% of the time). Use #id for JavaScript & anchor links.

If you find yourself using IDs for styling, you're probably doing it wrong.

✍️

Practice — Class & ID

Try these in VS Code before peeking at the answer

The Box Model

Every HTML element is a box with 4 layers. Hover each to understand.

margin
border
padding
Content

Hover over a layer in the box model to learn about it.

Margin
Border
Padding
Content
✍️

Practice — Box Model

Try these in VS Code before peeking at the answer

Inline vs Block vs Inline-Block

"Every HTML element is either a bully (block), a team player (inline), or a flexible hybrid (inline-block)."

🧱

display: block

A paragraph in a book — always starts on a NEW line and takes the FULL width.

Takes up the entire width available. Stacks vertically. You CAN set width, height, padding, and margin on all sides.

Starts on a new line
Takes full width by default
Width & height work ✅
Vertical margin works ✅
style.css
.element {
  display: block;
}
Live Preview
Block A
Block B
Block C

↑ Each block starts on a new line — takes full width

Default Display of Common HTML Tags(yes, browsers have opinions!)
📦<div>blockGeneric container
📄<p>blockParagraph
🔤<h1>-<h6>blockHeadings
📁<section>blockSection container
🏷️<header>blockPage header
👟<footer>blockPage footer
📋<ul> / <ol>blockLists
📝<form>blockForm container
<span>inlineInline wrapper
🔗<a>inlineLinks
💪<strong>inlineBold text
📐<em>inlineItalic text
🖼️<img>inlineImages (special!)
🔘<button>inline-blockButtons
⌨️<input>inline-blockForm inputs
📋<select>inline-blockDropdowns
✍️

Practice — Display Types

Try these in VS Code before peeking at the answer

CSS Magic — See the Difference

Toggle each CSS category on and off. Watch the preview transform in real-time.

CSS Code

css
1/* Toggle a property above to see the CSS */

Live Preview

Profile Card

Frontend developer who loves building beautiful interfaces.

HTMLCSSReact
✍️

Practice — CSS Properties

Try these in VS Code before peeking at the answer

If HTML is the skeleton, CSS is the outfit. Let's make it look fire.

CSS Position — Where Things Live

"Position is like assigning seats — static is the default, but the others give you superpowers."

🧍

position: static

Standing in a queue — you go where the line puts you.

Default position. Element flows normally in the document. top/left/right/bottom have NO effect.

style.css
position: static;
/* top, left, etc. do NOTHING */
Live PreviewElement flows normally
Box 1 — Normal flow
📦 I'm static — just in line
Box 3 — Normal flow
Cheat Sheet
✍️

Practice — CSS Position

Try these in VS Code before peeking at the answer

Flexbox Playground

Experiment with Flexbox properties and watch the layout change live.

display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-start;
flex-wrap: nowrap;
gap: 8px;

.container

1
2
3
4
5
✍️

Practice — Flexbox

Try these in VS Code before peeking at the answer

Before Flexbox, centering a div was a meme. Now it's 3 lines.

Responsive Design — Every Device

Switch devices and watch the layout adapt.

mywebsite.com
Logo
HomeAboutContact

Welcome to my site

A modern responsive website that adapts to any screen size.

Design

Lorem ipsum dolor sit amet.

Develop

Lorem ipsum dolor sit amet.

Deploy

Lorem ipsum dolor sit amet.

🖥️ Desktop680px
✍️

Practice — Responsive Design

Try these in VS Code before peeking at the answer

The Full Transformation

5 steps from plain HTML to a production-quality website.

Step 1: Plain HTML

Raw unstyled HTML — the browser's default rendering

My Website

A modern website built step by step using HTML and CSS.

Mini Challenge — Build a Hero Section

This is what you can build after Day 1. Toggle the styles to see each layer.

Premium layout, hierarchy, and visual polish.
mnmlst.
HOMEPRODUCTSTOREABOUT US

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ultrices fi……
Read More

less is
more.

Arlington Heights, IL

15k+
Person are helped from us everyday
1,456
New members Donate every day
1M+
Members from around the world

Rapid-Fire Quiz

Test what you just learned. No pressure... okay maybe a little.

Question 1 of 6Score: 0/6

What tag makes a heading?

What You Learned Today

A visual summary of everything you covered in Day 1.

HTML

Structure — the skeleton of every web page

CSS

Style — colors, fonts, and visual design

Flexbox

Layout — positioning and alignment control

Responsive

Adaptability — works on every device

Transitions

Polish — smooth micro-animations

Coming Tomorrow

Day 2 — JavaScript

Your card looks great. But click the button. Nothing happens.

Tomorrow, we fix that. Tomorrow, we add the BRAIN. JavaScript makes your website think, react, and talk to the internet.

HYRUP×sastranet

Web Dev Bootcamp — Day 1 Complete