A page can look different in your browser without its saved file changing. Developer tools help you investigate that difference. Their page inspector shows the document object model, or DOM: a tree of elements the browser currently uses to display the page. A node is one item in that tree, such as a paragraph.
HTML is the markup used to describe the original document. In the web-basics lessons you met tags such as <p>; the browser turns those tags into elements in its live tree. Firefox calls its tree panel Inspector; Chromium browsers call it Elements. Editing a paragraph there changes the current tab. A separate file edit and save would be needed to change the saved source.
Before you begin
- Recommended first
- The rule for every tool from here on, curl, and one HTTP request from Python, Snapshots, and how to undo a bad experiment
- Estimated time
- 18 min reading, 12 min activity. Setup and optional practice may take longer.
- Where you work
- Use the printed examples in any desktop or mobile browser, with paper or a text editor. No installation, account, proxy, certificate or scan is required. Ubuntu is sufficient for later practice; optional setup time is outside these estimates.
- Without a lab
- All evidence needed for the activity appears on this page. Copy it into notes if downloads are unavailable. Read the labeled model and predict each result; a paper trace practises the reasoning while tool operation waits for a lab. Reading needs no JavaScript. Answer checking needs JavaScript and a secure context; saving progress also needs usable browser storage.
After this lesson you can:
- Distinguish saved HTML from the browser’s live DOM.
- Trace a local edit and reload using the supplied sentence.
- Identify the document and stylesheet from the markup.
01Example
Read this authored sequence as a model. The tea sentence demonstrates the method; the room sentence in the activity is separate evidence.
Saved HTML: <p>Club tea is at noon.</p>
Current tree after a local edit: Club tea is at dusk.
Action: reload from the unchanged saved file.
Predicted tree: Club tea is at noon.
Reason: no action wrote the dusk sentence to the file.02The file, the tree, and the network list
The source record and devtools-demo.html contain the same HTML. The paragraph has id="hours": id gives that element a name that tools or scripts can select. Its text says the practice room opens at four. The <link> element names desk.css, a stylesheet containing rules for appearance.
The Network panel lists resources a page requests. A stylesheet named in HTML is evidence of a link, while a Network record would show whether a request actually happened and how it ended. The lesson supplies markup, not a new Network capture. The Console runs JavaScript in the page; it is unnecessary here. Never paste unfamiliar console code just to inspect text.
Compare saved HTML with the browser’s current page, then predict what a reload restores.Model. A teaching model drawn by hand. It shows the idea, not real tool output.
Read the full explanation below.
Saved file and tree say noon.
Saved file
Local DOM
An Elements edit changes the local DOM; no action here writes the source file.
Saved file and tree say noon.
Follow the explanation
- Saved file and tree say noon.
- A local DOM edit says dusk; the saved HTML remains noon.
- Reload restores noon from the unchanged saved file.
Read every state and value
1. Saved file and tree say noon.
- Example
- Local edit and reload
- Items
- Value: <p>Club tea is at noon.</p>; Status: unchanged · Value: Club tea is at noon.; Status: baseline
- Active Item
- tree
- Event Label
- Saved file and tree say noon.
- Visible Limit
- An Elements edit changes the local DOM; no action here writes the source file.
2. A local DOM edit says dusk; the saved HTML remains noon.
- Example
- Local edit and reload
- Items
- Value: <p>Club tea is at noon.</p>; Status: unchanged · Value: Club tea is at dusk.; Status: local edit
- Active Item
- tree
- Event Label
- A local DOM edit says dusk; the saved HTML remains noon.
- Visible Limit
- An Elements edit changes the local DOM; no action here writes the source file.
3. Reload restores noon from the unchanged saved file.
- Example
- Local edit and reload
- Items
- Value: <p>Club tea is at noon.</p>; Status: unchanged · Value: Club tea is at noon.; Status: restored
- Active Item
- tree
- Event Label
- Reload restores noon from the unchanged saved file.
- Visible Limit
- An Elements edit changes the local DOM; no action here writes the source file.
03Compare the file with a local edit
First complete the printed trace. A later desktop run may repeat it on the downloaded owned file: keep desk.css beside devtools-demo.html, open that HTML file, right-click its paragraph and choose Inspect. Use the browser menu for Developer Tools if the shortcut differs.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Desk note</title>
<link rel="stylesheet" href="desk.css">
</head>
<body>
<h1>Desk note</h1>
<p id="hours">The practice room opens at four.</p>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Desk note</title>
<link rel="stylesheet" href="desk.css">
</head>
<body>
<h1>Desk note</h1>
<p id="hours">The practice room opens at four.</p>
</body>
</html>
body {
font-family: sans-serif;
}
- Read source.txt and copy the paragraph’s original text into notes. Name the stylesheet from href="desk.css"; href is the linked resource’s address.
- In a paper trace, replace four with nine only in the current-tree column. Leave the saved-file column at four. If using the optional inspector, edit only the paragraph text in the live tree.
- Predict a reload before checking: reading the unchanged source rebuilds the paragraph with four. Compare the file and tree columns to explain why.
- Stop after the comparison. Close the owned tab and tools after optional practice; this activity requires no Console commands or other website.
04Optional challenge
For about ten optional minutes, draw two boxes named saved file and live DOM. Place the four → nine edit in the DOM box and reload as an arrow from the file. Your explanation should show why a screenshot of nine cannot establish what is saved.
05Optional Kali appendix
Kali is a Linux distribution assembled for security work. Tools bundled with a distribution do not grant permission to use them on a target. The Ubuntu guest introduced in Computers remains enough; you can finish this stage without any guest.
If you later choose Kali, follow its current virtualization instructions in a separate disposable guest. Reuse the guest boundaries from Computers: NAT without forwarding, no shared folders or clipboard, and a powered-off snapshot before changes. Check the official image and checksum instructions at that time. A snapshot restores the recorded guest state; it does not undo changes to the host.
Optional appendix. Not a required install. Ubuntu is enough for every checkpoint in this stage.
What Kali is
Kali is a Linux distribution aimed at security testing. It bundles many tools. A bundle does not grant a target, and it does not replace the Ubuntu guest from Stage 02.
If you later choose a second guest
- Use a disposable guest, not your everyday system.
- Follow Kali's current virtualization page for the hypervisor you already learned. No checksum is supplied here; verify the current official image before installing it.
- Reuse the Stage 02 boundaries: NAT, no port forwarding, no shared folders, and no shared clipboard.
- Take a snapshot while the guest is powered off, before you change it. That snapshot restores the guest state it recorded. It does not rewind the host.
- Keep any lab browser, proxy, or certificate inside that guest.
Stop
If the grant is missing, stop. If a download page and the file you received disagree with a checksum you checked yourself, stop. This checklist does not supply a checksum.
06Fresh cases for the checks
Use these fictional cases for the checks below. They have different inputs from the worked examples. Read them here or make notes; no installation or external service is needed.
Browser case A: authored local sequenceOwned fixture. An original file made for this course. Follow the activity's instructions in your own lab.
Saved file lobby.html: <p>Meet by the east door.</p>
At T1 the page is loaded from this file.
At T2 an Elements edit replaces east with west in the current DOM only.
At T3 the tab reloads from the unchanged saved file. No save or server update occurs.
Browser case B: independent markupOwned fixture. An original file made for this course. Follow the activity's instructions in your own lab.
Document filename: board.html
<link rel="stylesheet" href="board.css">
<p id="notice">Bring a badge.</p>
No Network capture accompanies this markup.
07Explain your evidence
Optional written self-check: explain one decision using the supplied case. No tool run is required.
Check your explanation: separate saved HTML from the live tree; identify the action that changes each; trace reload; distinguish a resource link from a captured request.
08Common mistakes
If a reload keeps your new sentence, compare the saved source with the model: you may have edited the file or enabled a persistent override. Stop and record the difference instead of assuming an ordinary DOM edit saved it.
If the expected panel is missing, look for Inspector or Elements in the browser’s developer-tools menu. On a managed or mobile device, use the printed two-column trace.
A stylesheet link does not prove a successful network request. Use the supplied markup to name the file and leave request success unclaimed.
References
- MDN: What are browser developer tools?
Official background for the tool or optional guest; no installation is required.
- Chrome DevTools: View and change the DOM
The HTML-versus-DOM appendix and editing instructions explain saved markup and the current tree.
- Kali: Should I Use Kali Linux?
Official background for the tool or optional guest; no installation is required.
- Kali documentation: Virtualization
Official background for the tool or optional guest; no installation is required.