← back to course
progress is saved in this browser — no account needed
devnotes / HTML & CSS Fundamentals / Lesson 1
lesson 1 of 6

What Is HTML? Build Your First Web Page

18 min · HTML & CSS Fundamentals

Every single web page you've ever visited is built from HTML underneath. It's not "code" in the scary sense — it's more like labeling. You're just telling the browser "this is a heading," "this is a paragraph," "this is a button." By the end of this lesson you'll have written and opened your very first web page.

HTML is structure, not logic

HTML stands for HyperText Markup Language. The important word there is markup — HTML doesn't calculate anything or make decisions, it just marks up content so the browser knows what each piece is. Headings, paragraphs, images, links, buttons: HTML labels all of it. The visual styling (colors, spacing, fonts) is a separate job that belongs to CSS, which we'll get to in Lesson 2.

Tags: the building blocks

HTML is made of tags, written between angle brackets. Most tags come in pairs: an opening tag and a closing tag (which has a forward slash), wrapping around content.

<h1>This is a heading</h1> <p>This is a paragraph.</p>

Some tags don't wrap content and don't need a closing tag, like the line break <br> or an image <img>.

The tags you'll use constantly

TagWhat it's for
<h1> to <h6>Headings, from most important (h1) to least (h6)
<p>A paragraph of text
<a>A link to another page
<img>An image
<div>A generic container, used to group other elements
<ul> / <li>A bullet list and its items

The skeleton every page needs

Every HTML file follows the same basic skeleton. You'll type this same structure at the start of nearly every page you ever build:

<!DOCTYPE html> <html> <head> <title>My First Page</title> </head> <body> <h1>Hello, world!</h1> <p>This is my very first web page.</p> </body> </html>
quick tip
Indentation (the spacing before each tag) doesn't affect how the browser reads your page — it's purely for humans. But keep it consistent. Messy indentation makes it much harder to spot a missing closing tag later.

Attributes: giving tags extra information

Tags on their own only say what something is. Attributes add extra details inside the opening tag — things like where a link goes, which image to show, or a name you can reference later in CSS or JavaScript.

<a href="https://example.com">Visit site</a> <img src="cat.jpg" alt="A sleeping orange cat"> <p class="intro" id="opening-line">Welcome!</p>
AttributeUsed onWhat it does
href<a>The URL the link goes to
src<img>The path or URL to the image file
alt<img>A text description — read by screen readers, and shown if the image fails to load
classany tagA label used to style multiple elements the same way with CSS
idany tagA unique label for one specific element
quick tip
Never skip alt on images. It's not optional politeness — it's what makes your page usable for people using screen readers, and it's also what search engines read to understand what your image shows.

Semantic HTML: tags that describe meaning, not just boxes

Early on, it's tempting to build everything out of generic <div> containers. Modern HTML gives you tags that describe what a section of the page actually is — this is called semantic HTML, and it matters more than it sounds like it should.

<header> <h1>My Site</h1> <nav>...</nav> </header> <main> <section> <article> <h2>Blog post title</h2> <p>Post content...</p> </article> </section> </main> <footer>© 2026</footer>

Why bother, if a <div> would look identical? Two real reasons: accessibility — screen readers use these tags to let someone jump straight to "navigation" or "main content" — and SEO — search engines use this same structure to understand what matters most on your page. Both of those directly affect whether real people can use and find your site.

Comments: leaving notes in your code

You can leave notes in your HTML that the browser completely ignores — useful for reminding yourself (or explaining to someone else) why a section exists.

<!-- This is a comment — the browser skips it entirely --> <p>This text shows up normally.</p>

Common mistakes beginners make (and how to spot them)

AD SLOT — 728×90 or responsive (mid-lesson)

Try it yourself

exercise
Open a plain text editor (Notepad, TextEdit, or better — a free code editor like VS Code), paste the skeleton above, and save it as index.html. Then double-click the file — it should open in your browser showing "Hello, world!" as a heading. Try changing the text, adding a second paragraph, and adding a link with <a href="https://example.com">click here</a>.

Level up: try the semantic version

exercise 2
Once the first exercise works, rebuild it using semantic tags instead of plain paragraphs: wrap your heading in a <header>, put your main text inside <main>, and add a <footer> with your name or the current year. This is genuinely how real sites are structured — you're not just practicing syntax, you're building the habit.
what's next
Once you're comfortable with structure, the natural next step is making it interactive — that's what our JavaScript Basics course covers (adding logic and behavior on top of the HTML you already know how to build). It's part of the devnotes membership, alongside every remaining lesson in this course.
bottom line
HTML's whole job is labeling content — with the right tags, and increasingly, tags that describe actual meaning (semantic HTML), not just visual boxes. Once that structure exists, CSS is what makes it actually look good — which is exactly what Lesson 2 covers.
AD SLOT — 300×250 or responsive (in-lesson)
next upLesson 2: Styling With CSS
Continue →