Full Stack JS

Chapter 1
0%

Chapter 1: HTML Fundamentals

Learn to build the structure of web pages — the skeleton that everything else is built on.

What is HTML?
Text Tags
Links & Images
Lists & Tables
Forms
Semantic HTML
Quiz

What is HTML?

HTML is like the skeleton of a human body. Without bones, you'd be a blob on the floor. Without HTML, a website would just be a wall of plain text with no structure. HTML gives your content structure — headings, paragraphs, lists, images, forms, and more.

HTML stands for HyperText Markup Language. Let's break that down:

The Basic Structure

Every HTML page follows this skeleton. Edit the code and click Run to see how it looks:

HTML — Page Skeleton

What is a Tag?

Tags are like labels on boxes. When you move house, you label boxes "Kitchen", "Bedroom", "Bathroom". HTML tags label your content: "this is a heading", "this is a paragraph", "this is a link".

A tag has three parts:

<h1> Hello World </h1>

↑ opening tag    ↑ content (what you see)    ↑ closing tag (has /)
Forgetting the closing tag is the #1 beginner mistake! Every <tag> needs a </tag>. The closing tag has a forward slash / before the tag name.

Text Tags

HTML has different tags for different types of text. Try editing and running the code below:

HTML — Text Tags

Tag Reference

TagWhat It DoesExample
<h1>-<h6>Headings (h1=biggest, h6=smallest)Page titles, section titles
<p>ParagraphAny block of text
<strong>Bold + importantKey information
<em>Italic + emphasisEmphasized words
<br>Line breakNew line (no closing tag needed!)
<hr>Horizontal lineSection divider (no closing tag!)
<mark>Highlighted textImportant terms

Links & Images

A link (<a>) is like a door — click it and you go somewhere else. An image (<img>) is like a photo frame — it displays a picture on your page.

What are Attributes?

Attributes give extra information about a tag. They go inside the opening tag:

<a href="https://google.com" target="_blank">Click me</a>

↑ attribute (where to go)    ↑ attribute (open in new tab)

Lists & Tables

HTML — Lists & Tables

🎯 Challenge!

  1. Add a new item to the unordered list
  2. Add yourself as a new row in the table (add a new <tr> with <td> cells)
  3. Click Run to see your changes!

Forms

A form is like a paper application — it has fields for name, email, checkboxes, dropdowns, and a submit button. HTML forms work the same way, but digitally.
HTML — Forms

Input Types Reference

TypeWhat It CreatesExample
textBasic text fieldName, address
emailEmail with validationuser@example.com
passwordHidden text field●●●●●●
numberNumber with arrowsAge, quantity
dateDate pickerBirthday
checkboxTick box"I agree to terms"
radioOne choice from groupGender selection
fileFile uploadUpload resume

Semantic HTML

Semantic means "meaningful." Instead of using <div> for everything (which just means "a box"), semantic tags tell the browser AND search engines WHAT the content IS. It's like the difference between a box labeled "stuff" vs one labeled "kitchen utensils."
HTML — Semantic Tags
Semantic TagMeaningInstead of...
<header>Top of page (logo, nav)<div class="header">
<nav>Navigation links<div class="nav">
<main>Main content<div class="content">
<article>Self-contained content<div class="post">
<aside>Sidebar info<div class="sidebar">
<footer>Bottom of page<div class="footer">
<section>A themed group<div class="section">

📝 Chapter 1 Quiz

1. Which tag creates a paragraph?

<h1>
<p>
<a>
<div>

2. What does the alt attribute do in an <img> tag?

Sets the image size
Makes the image clickable
Provides a text description of the image
Changes the image color

3. What's the difference between <ul> and <ol>?

ul = bullet points, ol = numbered list
ul = numbered, ol = bullet points
They are the same thing
ul = underline, ol = overline

4. Where does the <title> tag go?

Inside <body>
Inside <footer>
Anywhere on the page
Inside <head>

5. How do you make a form field mandatory?

Add important="true"
Add required
Add mandatory="yes"
Use <strong> tag
← Chapter 0: Getting Started Chapter 2: CSS →