Stop 02 · Developer Setup & ToolsTopics · 3/6

Browser DevTools

Part of the Web Development Roadmap

In short

Every browser has a free toolkit hidden behind one key, F12. With it you can see why a button looks wrong, why a script crashed or why data didn't load, without guessing.

Browser DevTools let you inspect and edit HTML and CSS live, read JavaScript errors in the console, watch network requests and check performance, all inside the browser.

The jaadu wears a stethoscope and listens carefully to a small wooden toy house, with a torch and a magnifying glass laid out beside it.

Think of it like this

The doctor's check-up kit

A doctor doesn't guess what's wrong. They use a stethoscope to listen, a thermometer to measure and a torch to look closer. DevTools is that kit for web pages. The Elements panel lets you look inside, the Console tells you what hurts, and the Network panel checks what's coming in and out.

Watch it happen

Two panels you'll open every day

Elements

  • See the live HTML tree
  • Edit CSS and watch it change
  • Find which rule is crossed out
  • See the box model: margin, border, padding

Console

  • Read red JavaScript errors with line numbers
  • See your console.log output
  • Run quick JS to test ideas
  • Click the file link to jump to the bug

Elements answers 'why does it look like this?'. Console answers 'why doesn't it work?'. The Network panel answers 'did the data arrive?'.

The big ideas

What you need to know

Inspect anything

Right-click an element and choose Inspect. Edits you make there are temporary, perfect for experiments.

Console first

When something doesn't work, open the Console. A red error with a file and line number is the best clue you'll get.

Network panel

Shows every request with its status code and response. A 404 or 500 there explains most 'data not showing' bugs.

Device mode

Ctrl+Shift+M (Cmd+Shift+M on Mac) previews your page at phone sizes, so you can test mobile layouts without a phone.

See it in code

Walk through the code

js
1// Try these in the Console of any page2document.title3document.querySelectorAll("a").length4document.body.style.background = "lightyellow"5 6// In your own script, log values to see what's going on7const price = 499;8console.log("price is", price);9console.table([{ item: "Pen", qty: 2 }, { item: "Book", qty: 1 }]);

1/3Read information about the page: its title and how many links it has.

Console experiments only affect your copy of the page, and they disappear when you reload.

Save yourself the pain

Common mistakes

Oops

Fixing styles in DevTools and forgetting to copy them into your CSS file.

Do this instead

DevTools edits vanish on reload. Once it looks right, copy the rule into your real stylesheet.

Oops

Ignoring the Console and staring at the code instead.

Do this instead

Open the Console first. The error message usually tells you exactly where to look.

Your mission

Inspect a real site

~20 min

Quick check

Your page loads but the product list is empty. Which panel shows whether the data request failed?

Go deeper

  1. 1Right-click any element, choose Inspect and change its colour and text live.
  2. 2Type a few JavaScript expressions into the Console tab and see the results.
  3. 3Use the device toolbar to preview a site at phone width.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge