HTML - Forms and Tables Part 3

May 15, 2026 3:00pm UTC (Check your timezone)

Theory Review Quiz Certification project

Instructors: Jess, Carmen, and Eda

Forms and Tables

Download iCal File

Before this session, please:

During this session, we’ll:

After this session, please:

Instructor notes

Working with HTML Tools: What Is an HTML Validator, and How Can It Help You Debug Your Code?

HTML is a famously forgiving language. If you forget to close a tag, the browser doesn’t throw an error or refuse to render. It just does its best to figure out what you meant and shows you something. This is great when you’re starting out (typos don’t crash your page), but it can also let bugs hide in plain sight.

A concrete example. Imagine you have this:

1<h1>Article Topic</h1>
2<h2>Subheading 1 </h2>
3<h2>Subheading 2 </h2>
4
5<!-- This h2 does not have a closing tag -->
6<h2>Subheading 3

That last h2 has no closing tag. The browser renders it anyway and the page looks fine. But the moment you add paragraphs after each heading, things go sideways:

1<h2>Subheading 3
2<p>Lorem ipsum dolor...</p>

That <p> ends up being rendered as part of the still-open <h2>, so your paragraph text appears as a giant heading. The page looks broken and you have no idea why. The browser will not tell you what went wrong.

This is exactly the kind of bug an HTML validator catches.

HTML validator: a tool that checks the validity of your HTML code against the standard HTML specifications. It identifies errors and warnings in your code, helping make sure your pages are correctly structured and compliant with web standards.

Why use one?

Two validators to know:

  1. W3.org markup validation service at validator.w3.org. This is the most widely accepted HTML validator. You can use the Validate by Direct Input button to paste in your HTML, then hit Check, and you’ll get a list of errors that need fixing.

  2. jsonformatter.org, which also offers an HTML validator. Paste your code into the editor and hit Validate to see any errors.

Questions:

Working with HTML Tools: How to Use the DOM Inspector and DevTools to Debug and Build Your Projects

When you’re building a project and something isn’t working as expected, you’re not just looking at it and guessing. Every browser ships with a set of tools to help you figure out what’s going on. Learning to use them is one of the biggest jumps you’ll make as a developer.

Bug: what programmers call an issue or problem with code.

Debugging: the process of finding and fixing those bugs.

To debug your code, you’ll use tools that come built into your browser. Two important ones are the DOM inspector and the developer tools (often called DevTools).

DOM inspector: a tool that lets you inspect the HTML structure of the page you’re currently on.

DOM (Document Object Model): a tree-like structure that represents the elements on a page. We’ll learn more about the DOM in later modules. For now, just think of it as a map of all the HTML elements on a page and how they nest inside each other.

Developer tools (DevTools): a set of tools built into your browser that lets you inspect the HTML, CSS, and JavaScript of the page you’re on. The DOM inspector is one part of DevTools.

How to open DevTools:

The two tabs to know to start:

  1. Elements tab: shows you the HTML structure of the page. You can click on elements to highlight them on the page, see their attributes, and even temporarily edit them to test changes.

  2. Console tab: shows you any errors that might be occurring on the page. If something is broken, this is the first place to look.

A worked example. Imagine you have this:

1<a href="https://www.freecodecamp.org/larn/">freeCodeCamp curriculum</a>

When you click the link, it takes you to a 404 page (the error page that shows up when a URL doesn’t exist). The link looks fine at a glance. So how do you find the problem?

  1. Open DevTools and check the Console tab. You’ll see a 404 error.
  2. The 404 tells you the page wasn’t found, so the URL is wrong somewhere.
  3. Switch to the Elements tab and inspect the anchor element. Look at the href value: /larn.
  4. The correct path is /learn. There’s a typo.

Without DevTools you’d be poking at this for a while. With them, you found the bug in under a minute.

Questions: