Why HTML Changes Aren't Showing in the Browser
Your HTML edit saved fine but the page still looks identical? The usual causes are a browser cache, a wrong file, a .html.txt extension, DevTools-only edits, or CSS being overridden — with the quick fix for each.
The maker behind Empowia
Quick answer
If your HTML changes aren't showing, the usual culprits are a file you didn't save, a browser cache still serving the old page or CSS, a wrong extension like .html.txt, edits you only made in DevTools, or a different copy of the file open than the one you edited. Save the right file, then hard-refresh with Ctrl+Shift+R (Cmd+Shift+R on a Mac) to force the browser to re-fetch it. If it still won't change, check that another CSS rule isn't overriding yours.
Key takeaways
- The most common reason HTML changes don't show is a stale cache. A hard refresh — Ctrl+Shift+R on Windows and Linux, Cmd+Shift+R on a Mac — forces the browser to re-fetch the page and its CSS instead of using its copy.
- Edits made in the browser's DevTools (the Elements or Styles panel) live in the tab's memory only. They vanish on refresh and never touch your source file, so copy anything that worked back into the real file and save.
- Saving from Notepad can turn index.html into index.html.txt, so the browser stops treating it as a page. Set "Save as type" to "All Files" and turn on file-name extensions to catch it.
- If a CSS change won't apply even after a hard refresh, a more specific or later rule is probably overriding it. DevTools shows the losing rule struck through in the Styles panel.
- A live editor that keeps the code and the rendered page in sync sidesteps most of this, because there's no save-switch-refresh gap where a cache or a wrong file copy can fool you.
This one had me going for ten minutes once. I was saving a file in my Downloads folder and refreshing a tab that held the same page — opened from my Desktop. Same name, same contents, two different files, and I was editing the copy nobody was looking at. That's the usual story. When an HTML change won't show, the code is almost never broken — it's a stale cache, a file you didn't really save, a .html.txt extension, an edit stranded in DevTools, or the browser reading a different copy than the one you changed. Here's the checklist I run, fastest catch first.
the sixty-second checklist
Before you change anything, read down this list. Most of the time the answer is already sitting in it.
- You didn't save. The change is still in the editor, never written to disk.
- You're viewing a different copy. The tab is pointed at another folder, or at a hosted version — not the file you edited.
- The browser cached it. It's serving the old page or old CSS from memory instead of re-reading the file.
- The file has the wrong extension.
index.html.txtlooks right and behaves like plain text. - You only changed it in DevTools. Those edits live in the tab and vanish on refresh.
- Another CSS rule is overriding yours. Your change is there — it's just losing the cascade.
Now the fixes, in the order I'd actually check them.
you didn't actually save
Start with the dumbest possibility, because it's the most common one. Look at your editor's tab — if there's a dot or an asterisk on it, that's the "unsaved" mark, and you refreshed the browser before the change ever hit the disk. Ctrl+S. Done.
A quieter version of the same problem is saving into the wrong place. Your editor "saved a copy" somewhere you didn't expect, or you have the file open twice, and the browser is reading the original you never changed. Which leads straight to the next one.
you're editing one file and viewing another
This is the twin of the last one, and it hides even better. The file is open in two places — two different folders, say, or a local copy and a hosted version — and you're diligently editing one while the browser shows you the other.
Check the address bar. A local file shows a file:/// path with the full location, and it should match the file you just edited, character for character. If you're working on a site that's actually being served — running on localhost, or already deployed somewhere — that's a whole extra layer. Refreshing the local file won't show server changes, and refreshing the live URL won't show local ones. Figure out which copy you're changing, then point the browser at that exact copy.
the browser is showing you yesterday's page
Browsers keep a local copy of pages, images, and especially CSS so they don't re-download everything on every visit. Most days that's a favor. While you're editing, it's the thing lying to your face — a plain refresh can hand you the cached version instead of re-reading the file.
The fix is a hard refresh, which tells the browser to dump its copy and fetch everything again. Ctrl+Shift+R on Windows and Linux, Cmd+Shift+R on a Mac. Ctrl+F5 works too on Windows. CSS is the sneaky part here — your HTML text updates but the styling doesn't, because the linked stylesheet got cached on its own. A hard refresh clears both. And if it still won't let go, open DevTools, and with it open, right-click the reload button and pick Empty Cache and Hard Reload. That leaves nothing behind for the page.
your file quietly became a .txt
Fix first, then the why. Set "Save as type" to "All Files" before you save, or wrap the name in quotes — "index.html" — and turn on file-name extensions so you can see the real ending. What bites you is Notepad's default. You edit index.html, hit Save As, and the dialog assumes a plain text document, so it tacks .txt on and you walk away with index.html.txt — which the browser reads as text, while the real .html beside it never moves. It catches more people than anything else on this list, and I go deeper in how to edit an HTML file.
you only changed it in DevTools
If you've been right-clicking the page, choosing Inspect, and typing your changes into the Elements or Styles panel — those changes aren't real, not in the way that counts. DevTools edits live in the browser tab's memory. They're great for trying something out on the live page, but they never touch the file on disk, and the instant you refresh, they're gone.
So of course the edit disappears. Refreshing is precisely what throws it away. To make it stick, copy what worked out of DevTools and paste it into your real file, then save. DevTools is a sketchpad you draw on to see how it looks. The file is the document. Only one of them keeps what you write.
another rule is winning the fight
Sometimes the change is genuinely in the file, saved, and un-cached — and still nothing moves. Nine times out of ten that's CSS overriding CSS. You set a colour on a paragraph, but a more specific selector further down the stylesheet, or an inline style sitting right on the element, or somebody's stray !important, is beating you. Specificity comes first — a more targeted selector wins no matter where it sits in the file, and only when two rules are equally specific does the later one take it. That's the cascade doing its job — just not the job you had in mind.
DevTools makes it obvious. Inspect the element, open the Styles panel, and the rule that lost sits right there with a line struck through it. Whatever's crossing out your rule is what you need to change, or write something more specific than. It beats guessing every time.
how a live editor skips most of this
Look back at that list and notice what most of it shares. The save, the flip to the browser, the refresh — that little gap between editing and seeing is where a cache creeps in, where the wrong file sneaks in, where a .txt hides. Close the gap and most of these simply can't happen.
That's the idea behind the tool I built, HTML Tweak. You open your .html file and edit it with the rendered page and the code side by side and in sync — change one, the other moves with it, no save-and-refresh dance in the middle. There's no cached copy to fight, because you're looking at the file itself, and nothing you type is stranded in a panel that forgets it on refresh. In Chrome or Edge it saves straight back to the file; other browsers download the edited copy. It won't run a multi-file React or Next project — it's built for finishing a single page — but for that, the whole "why isn't this showing" question mostly stops coming up.
So next time the page won't budge, run the checklist from the top — it's almost always the cache, and almost never your eyes. And if you'd rather not play save-and-refresh roulette at all, HTML Tweak just shows you the file changing as you type.
FAQ
Why aren't my HTML changes showing?
Almost always one of a few small things. You didn't save, or you saved a different copy than the browser has open; the browser cached the old page or CSS; the file has a wrong extension like .html.txt; you only changed it in DevTools; or another CSS rule is overriding yours. Save the correct file, then do a hard refresh to force the browser to re-read it from disk.
Why won't the browser update my HTML?
Usually because it's showing you a cached copy or you're pointed at a different file than the one you edited. A normal refresh can reuse the browser's stored version, so do a hard refresh (Ctrl+Shift+R, or Cmd+Shift+R on a Mac) to re-fetch everything. Also check the address bar — the file:/// path should be exactly the file you just changed.
How do I clear the cache for one page?
The quickest way is a hard refresh, which reloads just that page and its files while ignoring the cache. Use Ctrl+Shift+R on Windows and Linux, Cmd+Shift+R on a Mac, or Ctrl+F5 on Windows. For a full clear, open DevTools, then right-click the reload button and choose Empty Cache and Hard Reload — that leaves nothing stored for the page.
Why don't my CSS changes show up?
Two common reasons. Stylesheets get cached separately from the HTML, so the page can update while the styles don't — a hard refresh fixes that. If the style still won't apply, another rule is probably overriding it: a more specific selector, an inline style, or an !important elsewhere. Inspect the element in DevTools and the losing rule shows up struck through.
Do changes made in DevTools get saved?
No. Edits you type into the Elements or Styles panel live in the browser tab's memory and disappear the moment you refresh. They're for trying things out live, not for changing the file. To keep a change, copy what worked out of DevTools and paste it into your actual .html or .css file, then save that file normally.
How do I do a hard refresh?
Press Ctrl+Shift+R on Windows or Linux, or Cmd+Shift+R on a Mac. Ctrl+F5 also works on Windows, and holding Shift while you click the reload button does the same thing. A hard refresh tells the browser to throw out its cached copy of the page and its files and download everything fresh from disk or the server.
Comments
Loading comments…