If Internet Explorer shows tags such as <html> and <p> instead of rendering a page, the file is usually not being treated as HTML. The most common cause in this workflow is copying HTML source into Word and exporting it again: the source becomes the document’s visible content. Edit the original source in a plain-text editor, save it directly with a real .html or .htm extension, and verify the server identifies hosted files as HTML.
What caused the tags to appear?
A common Word workflow is:
- Create or export a document as a web page.
- Open that page and view its source.
- Copy the source into a new Word document.
- Save the new document as HTML.
The last step does not preserve the source as executable markup. It creates an HTML document whose body contains the copied source characters. The browser therefore receives text to display, not tags to interpret. Word may also add namespaces, metadata and auxiliary files because it is a rich-document exporter rather than a source-code editor.
As Gary Turner explained in the relevant SitePoint discussion, after modifying Word’s source you should “simply save it” rather than paste it back into Word. In other words, modify the existing source file directly.
Fix a local file step by step
1. Edit the source outside Word
Open the original HTML file in Notepad or another plain-text editor. Do not paste the source into a new Word document and export it again. Save changes to that same text file.
#1 Best Overall
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
2. Confirm the real extension
Use .html or .htm. Windows can hide known extensions, so a file that appears to be home.html may actually be home.html.txt. Turn on file-name extensions in File Explorer and rename the file if necessary.
3. Start with a normal document structure
A minimal page should have a doctype, an html element, a head, and a body:
Rank #2
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Test page</title>
</head>
<body>
<h1>It works</h1>
<p>This text should be rendered, not shown as tags.</p>
</body>
</html>
Save the file as plain text, then open that directly saved file in Internet Explorer. If this minimal page renders, add your original sections back a piece at a time. The first addition that makes the page fail identifies malformed markup or a missing asset.
4. Keep presentation separate
Put CSS in a separate stylesheet when practical instead of relying on Word’s generated formatting. This makes the source easier to inspect and avoids carrying Word-specific markup into a hand-maintained page.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteRank #3
Check hosted pages separately
A file can be correct on disk and still be delivered incorrectly by a web server. For a hosted page, inspect the HTTP response metadata and confirm that the response is identified as HTML, normally with an HTML Content-Type. The W3C HTML specification says that the actual type supplied by the response is used to determine how a fetched resource is processed. If the server labels the file as plain text, a browser may display the markup rather than parse it as a document.
This creates two distinct troubleshooting cases:
| Where you open the file | What to verify | Likely correction |
|---|---|---|
| Local file opened from your computer | The file is plain text and its real name ends in .html or .htm |
Edit and save directly in a text editor; remove an accidental .txt suffix |
| Page fetched from a website | The server’s response identifies the resource as HTML | Correct the server or hosting MIME/Content-Type configuration |
| Source visibly contains escaped or literal tags | The markup was copied into a document as content | Restore the original source and stop the Word round trip |
Do not make JavaScript a prerequisite
JavaScript is not the fix for HTML being displayed as text. First make the document, navigation and essential content work without scripting. Add JavaScript afterward to enhance the experience. A script-dependent page can appear broken even after the markup problem is corrected, especially in an old browser or when scripts are blocked.
Rank #4
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
When Word is the wrong tool
Word can export a document for viewing on the web, but its generated markup is difficult to maintain and is not a good substitute for learning HTML and CSS. For a page you intend to edit repeatedly, use a plain-text code editor and standard markup. A beginner HTML/CSS book can help with document structure, selectors and validation, but the essential change is the editing workflow: source stays source, and the browser receives it directly.
Quick Recap
Best Value
Quick diagnostic checklist
- Did you copy “View Source” output into Word before saving again?
- Are you editing the existing HTML file in a plain-text editor?
- Does the actual filename end in
.htmlor.htm, rather than.txt? - Does the file begin with a doctype and contain separate
headandbodysections? - If it is hosted, does the HTTP response identify it as HTML rather than plain text?
- Does a minimal page render before you restore the rest of the content?
- Does the page’s basic content work before JavaScript is added?
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problems




