Skip to content
TechToolsHQ
NewsReviewsGuidesTech 101Tech SeriesToolsNewsletter
TechToolsHQ

Independent, research-driven tech coverage — breaking news, in-depth reviews, buying guides, and technical tutorials to help you understand and choose with confidence.

Explore
NewsReviewsGuidesTech 101Tech SeriesFree Tools
Legal
About UsOur AuthorsContact UsPrivacy PolicyTerms of ServiceCopyright & DMCAAffiliate DisclosureEditorial PolicyAdvertise With Us

© 2026 TechToolsHQ. All rights reserved.

Tech Series/Chrome DevTools Essential/The Elements Panel: Inspect and Edit Any Web Page Live
Chrome DevTools Essential · Part 2 of 3

The Elements Panel: Inspect and Edit Any Web Page Live

How to read a page's HTML, change its CSS in real time, and never lose an edit — using the Elements panel.

By Himanshu Bhatt· 5 min read· August 16, 2026

3D Google Chrome logo floating above a green background with a soft shadow.
Key Takeaways · TL;DR
  • The Elements panel shows the page's live DOM (its HTML structure) on the left and the applied CSS in the Styles pane on the right.
  • Select any element by right-clicking it and choosing Inspect, by clicking the Select-an-element tool (Ctrl+Shift+C), or by clicking a node in the DOM tree.
  • You can edit HTML and CSS live; a struck-through CSS rule means a more specific rule overrode it (the cascade).
  • The box model diagram shows content, padding, border, and margin, and you can edit each value by double-clicking it.
  • The Changes drawer keeps a diff of every edit — but all live edits vanish on reload unless you save them.
☰ On this page(show)(close)
  • 1.Inspecting the page: the DOM
  • 2.Editing HTML live
  • 3.Reading CSS: the Styles pane and the cascade
  • 4.Editing CSS live
  • 5.The box model: spacing made visible
  • 6.The Computed tab: the final answer
  • 7.The Changes drawer: never lose an edit by surprise
  • 8.Hands-on: fix a broken card
  • 9.What's next
On this page
  • 1.Inspecting the page: the DOM
  • 2.Editing HTML live
  • 3.Reading CSS: the Styles pane and the cascade
  • 4.Editing CSS live
  • 5.The box model: spacing made visible
  • 6.The Computed tab: the final answer
  • 7.The Changes drawer: never lose an edit by surprise
  • 8.Hands-on: fix a broken card
  • 9.What's next
INFO

Where we are: In the previous lesson you learned to open DevTools and reach any tool with the Command Menu (Ctrl+Shift+P). This part opens the Elements panel — the tool DevTools is best known for — where you inspect a page's HTML and change its CSS while watching the page update. New to the series? You only need Chrome and this page.

Inspecting the page: the DOM

When Chrome loads a page, it turns the HTML into a live, tree-shaped model called the DOM (Document Object Model). The Elements panel shows this tree. Each branch is an element — a heading, a paragraph, an image — and selecting one highlights it on the page so you can see exactly what it is.

There are three ways to select an element, and you will use all of them. Right-click anything on the page and choose Inspect. Click the Select an element tool (the arrow-in-a-box icon, or press Ctrl+Shift+C / Cmd+Shift+C), then click on the page. Or click a node directly in the DOM tree — as you hover each node, DevTools highlights the matching area on the page.

The Select-an-element tool highlighting an element on the page with its size tooltip
Hovering with the Select-an-element tool highlights the element and shows its dimensions.•TechToolsHQ

Editing HTML live

You can change the page's HTML directly in the DOM tree, and the page updates instantly. This is perfect for testing a wording change or trying a different structure before you touch your real code.

  • Edit text: double-click the text inside a node and type.
  • Edit the whole element: right-click a node and choose Edit as HTML — you get syntax highlighting and autocomplete.
  • Edit an attribute: double-click the attribute name or value (for example, change an image's src).
  • Reorder: drag a node up or down the tree.
  • Hide it: select a node and press H to toggle its visibility.
  • Delete it: select a node and press Delete.
  • Duplicate it: press Shift + Alt + Down (Shift + Option + Down on Mac).
SUCCESS

Pro tip: To find an element fast in a big page, press Ctrl+F (Cmd+F) inside the Elements panel. The search box accepts plain text, CSS selectors, and XPath selectors, and jumps through every match.

Reading CSS: the Styles pane and the cascade

With an element selected, the Styles pane on the right lists every CSS rule that applies to it. Rules are shown in cascade order, and this is the single most useful thing the Styles pane teaches you: why an element looks the way it does.

If a property is struck through, another rule overrode it. That happens because of the cascade and specificity — when two rules target the same element, the more specific one wins (an ID beats a class, a class beats a tag). Seeing the struck-through line tells you instantly which rule is actually in charge.

/* CSS cascade: which rule wins? */

#price { color: red; }    /* ID selector      — High specificity  (WINS) */
.price { color: blue; }   /* Class selector   — Med specificity   (Struck through) */
p      { color: green; }  /* Element selector — Low specificity   (Struck through) */

/* DevTools strikes through the losers so you can see the winner at a glance. */

Editing CSS live

Everything in the Styles pane is editable. Click a value to change it, and untick the checkbox next to a declaration to toggle it off. To add a new declaration, click inside the braces of a rule, or use the element.style block at the top to apply an inline style to just the selected element.

  • Color Picker: click the small color swatch next to any color value to open the Color Picker, then use the eyedropper to sample a color from anywhere on the page.
  • Toggle classes (.cls): click the .cls button to add a class or switch existing classes on and off.
  • Force a state (:hov): click the :hov button, or right-click a node and choose Force State, to hold a pseudo-state like :hover, :focus, :active, :visited, or :focus-within — so you can style a hover effect without keeping the mouse still.
The Styles pane showing a struck-through rule, the .cls and :hov buttons, and the Color Picker
The Styles pane: toggle declarations, force states, switch classes, and pick colors — all without writing code.•TechToolsHQ

The box model: spacing made visible

Every element is a box with four layers: content, then padding around it, then a border, then margin outside that. Open the box model diagram with the Show sidebar button in the Styles pane. Double-click any value in the diagram to change the width, height, padding, margin, or border and watch the page shift.

CSS BOX MODEL ANATOMY
LAYER 01
Margin

Outer transparent spacing around the element

LAYER 02
Border

The line surrounding the padding and content

LAYER 03
Padding

Clear space around the content inside the border

LAYER 04
Content

The actual text, image, or child elements

The Computed tab: the final answer

The Computed tab (next to Styles) shows only the CSS that is actually being applied, after the cascade has resolved every conflict. When you cannot work out why an element has a certain size or color, Computed gives you the final value and lets you expand it to see which rule produced it.

The Changes drawer: never lose an edit by surprise

Every live edit you make is tracked in the Changes drawer. Open it with the Command Menu (Ctrl+Shift+P, type "Show Changes") or from More Tools › Changes. It shows a color-coded diff of your CSS edits, a Copy button to paste them into your real source file, and a Revert all changes button to undo them.

WARNING

Gotcha: Live edits in the Elements panel are temporary. They disappear the moment you reload the page. The Changes drawer lets you copy them out first — and later in this series (Workspaces and Local Overrides) you will learn how to make edits that persist automatically.

Hands-on: fix a broken card

Open any web page with a "card" on it — a product tile, an article preview, anything boxed. Then practice the full loop.

  1. 1
    Inspect: right-click the card's title and choose Inspect.
  2. 2
    Read: in the Styles pane, find one struck-through property and work out which rule overrode it.
  3. 3
    Edit: change the card's background color using the Color Picker, and its padding using the box model diagram.
  4. 4
    Force a state: use :hov to preview the card's hover style.
  5. 5
    Capture: open the Changes drawer and click Copy to grab your CSS diff.
  6. 6
    Break & Fix: reload the page (your edits vanish), then redo the background change from memory — and this time copy it before reloading.

What's next

You can now inspect and restyle any page by hand. But modern layouts — flexbox, grid, and container queries — are hard to debug by reading numbers alone. In the next part, we turn on DevTools' visual layout overlays to see exactly where your rows, columns, and gaps really are.


Frequently asked questions

What does a struck-through style in the Styles pane mean?
It means another CSS rule overrode that property. Because of the cascade and specificity, when two rules target the same element the more specific one wins, and DevTools strikes through the one that lost.
What is the difference between the Styles tab and the Computed tab?
The Styles tab shows every rule that could apply, in cascade order. The Computed tab shows only the final value actually applied after all conflicts are resolved — useful when you just need the answer.
Why do my Elements-panel edits disappear when I reload?
Live edits are stored only in the current browser session, not in the site's files. Reloading fetches the original files again. Copy your changes from the Changes drawer first, or use Workspaces/Local Overrides (covered later in this series) to persist them.
How do I preview a hover effect without moving my mouse away?
Use Force State. Click the :hov button in the Styles pane, or right-click the element and choose Force State, then tick :hover. The state stays applied while you edit its styles.

This article was produced with AI assistance for drafting and research. All facts have been verified and the final content has been reviewed and approved by a human editor.

Share
📝 Interactive Quiz

Test Your Knowledge

📋 3 questions🎯 70% to pass⏱ ~2 min
Series: Chrome DevTools Essential

Part 2 — The Elements Panel: Inspect and Edit Any Web Page Live

Part 2 of 3
← Previous partPart 1 — Chrome DevTools for Absolute Beginners: Your First LookNext part →Part 3 — Debug Modern CSS Layout: Flexbox, Grid, Subgrid & Container Queries

Enjoying the Chrome DevTools Essential series?

TechToolsHQ is an independent, reader-supported tech platform. If this article saved you time, solved a tough problem, or helped you learn a new skill, consider supporting our work. Your support helps us keep our in-depth series 100% free and updated for everyone.

100% optional · Reader supported · Independent researchSupport our work

Don't miss the next deep-dive

Weekly breakdowns of the tools students and builders actually use.

No spam·Unsubscribe any time·Privacy-first