Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If Internet Explorer shows tags such as <html> and <body> instead of a rendered page, the file may contain the HTML source as ordinary page content. This commonly happens when source is copied into Word and then exported as a web page. Edit and save the source in a plain-text editor, check the file extension, and—if the page is hosted—verify that the server identifies it as HTML.

Why Internet Explorer displays the HTML code

A browser renders HTML when it receives an HTML document. If the document instead contains the markup as visible text, the browser displays that text rather than interpreting it as page structure.

A common cause is a Word round trip: create or export a page in Word, view its source, copy that source into a new Word document, then save the new document as a web page. In a SitePoint Forums discussion, Gary Turner explained that this process creates an HTML document whose content is the modified source itself. In other words, the tags have become the page’s text. Word may also add its own namespaces, metadata, and linked auxiliary files, making it an unsuitable tool for editing raw HTML.

Fix the file without sending it through Word again

  1. Open the source in a plain-text editor. Use Notepad or another plain-text code editor, not Word. Make changes in the source file itself.
  2. Save that file directly. Save it with an .html or .htm extension. Do not paste the source into a new Word document and export it again.
  3. Check the real file extension. On Windows, hidden extensions can make a file appear to be page.html when its actual name is page.html.txt. Confirm the complete filename in File Explorer or your editor.
  4. Open the saved file in Internet Explorer. If it renders, the revised editing workflow has addressed the problem. If it still shows markup, make a minimal test file and add the original content back in small portions to identify the troublesome part.

Use a basic HTML document structure

A simple page should have a document type declaration and separate head and body sections. For example:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
BoxWave Cable Compatible with Garmin inReach Explorer+ - Micro USB DuraCable, Braided Micro USB Charging Cable - Space Grey
  • 🔋 [100% COMPATIBLE] BoxWave Cable Compatible With Garmin inReach Explorer+. Features USB 2.0 Standards for easy syncing connectivity and charging compatibility for your device 💬 Includes limited 3rd party tech support for your device (up to 3 inquiries via messaging) - not affiliated with or endorsed by Garmin ⭐ *** PLEASE NOTE, GARMIN INREACH EXPLORER+ DEVICE NOT INCLUDED ***
  • 💪 [STABILITY AND STRENGTH] Durable BRAIDED NYLON construction lasts longer, and prevents kinking or splitting. Rubberized grommet strain reliefs add durability
  • 📏 [LENGTH] 3 foot cable provides flexibility for charging
  • 🌏 [UNIVERSAL] The charging end is a standard USB connector that can be used with ANY USB port or charger!
  • ✌ [DUAL-FUNCTION] The Micro USB DuraCable combines SYNC AND CHARGE capabilities into a single, durable, standard, low-cost cable for your device! DUAL FUNCTION design replaces the cradle and makes traveling convenient.
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>My page</title>
</head>
<body>
  <h1>My page</h1>
  <p>This is page content.</p>
</body>
</html>

Keep CSS in a separate stylesheet when practical. That separates presentation from the document structure and makes the source easier to maintain. If the page relies on JavaScript, make sure its content and basic navigation still work without scripting; use scripts to enhance the experience rather than make essential content inaccessible.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

If the file is hosted, check how the server identifies it

A local file and a page fetched from a web server have different delivery paths. For a hosted page, the HTTP response should identify the resource as HTML, typically with a Content-Type of text/html. The W3C HTML 5.1 specification explains that the actual type provided by the response is used to determine how the resource is processed. If the server labels an HTML page as plain text, the browser may display its markup instead of rendering it. Ask your hosting administrator or check the server configuration if a correctly saved local file works but the hosted version does not.

Quick Recap

Bestseller No. 1

How to isolate what is still wrong

  • Both the local and hosted copies show tags: Check that you are opening the intended file, that its true extension is .html or .htm, and that the source was not pasted into a Word document as text.
  • The local file renders but the hosted copy does not: Check the hosted response’s Content-Type and server configuration.
  • A minimal page renders, but the original does not: Restore the original content in increments. Check whether the file includes the expected HTML structure and whether images, stylesheets, or other linked assets are available at the referenced paths.

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.