Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a basic html file and it opens fine in firefox. But in IE it just shows up as plain text (the tags are shown instead of rendered).

My file looks like this

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<title>Testing html rendering</title>
<h1>This is a test to display html</h1>
<p>blah blah blah blah blah </p>

I feel like there is a setting wrong on my computer. Because apps that are using embedded IE controls are failing to render as well.

Any help would be great!


share|improve this question
What is the filename? – ahockley Aug 13 '09 at 21:45
the filename is index.html – joe Aug 13 '09 at 21:49
What is the version of IE? – Qwerty Aug 18 '09 at 0:25
Shouldn't this be over on Stack Overflow? – mandroid Aug 18 '09 at 18:24

10 Answers 10

up vote 8 down vote accepted

This could very well be a problem in the registry.

Look for the following key in the registry editor (which I hope you're familiar with):


Does the "Content Type" REG_SZ value exist, and if so, what is its value?

  • If it does exist, it should be "text/html".

  • If it doesn't exist, use the (Default) REG_SZ value to locate the associated file type HKEY_CLASSES_ROOT key. E.g. if it says htmlfile, look under:


    If that key doesn't have a "Content Type" value either (or it isn't "text/html"), create it and set it to "text/html". That should fix it.

If you have to make that change, though, it might just be a stop-gap solution, since I don't know what actually "corrupted" those MIME types in the first place.

I also don't know if there are any other, better ways to fix this.

share|improve this answer
You are a genious! – joe Aug 18 '09 at 21:08

Are you certain the filename is index.html and not index.html.txt or something? Windows does have a bad habit of trying to help you and get in your way at times.

Try creating the file by opening a command prompt window and typing: "notepad index.html" (without the quotes of course). You might get prompted that the file does not exist, just click yes you want to create it and then paste in that HTML you mentioned.

If that doesn't clear it up, you probably have something more seriously wrong with your mime types and file extension mappings. Try adjusting them under the Tools -> Folder Options -> File Types (under Windows XP, might be different but similar under Vista/7). It could be you have somehow associated HTML with a plain text file type.

share|improve this answer
I am sure it is index.html But I like your point about adjusting the associations. I will try it next time I get to the users computer. – joe Aug 14 '09 at 14:10
My registered types look like this. Extensions | FilesTypes HTML | HTML File Is this right? What about the MIME types. Is there something in the registry that could of got corrupted? Thanks! – joe Aug 17 '09 at 22:56
  1. The Microsoft Windows default settings will hide the extensions of most common files (including .htm or .html). Follow these instructions to ensure that file extensions are showing. Another way to reveal the real file is to right-click on the file and click Properties. What filename is shown near the top of the Properties window?
  2. If the file is indeed appropriately named then the issue is likely to be an Internet Explorer fault. Send the file to someone with the same version of Microsoft Windows and Internet explorer to see how it behaves. Better yet, upload it to MediaFire (no account required) and we will test it for you :)
share|improve this answer

Does a reset do anything?

Tools -> Internet Options -> Advanced -> Reset

share|improve this answer

Not sure if this will help you, but adding this line within the header made it display in IE just fine for me.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

Worth a shot.

share|improve this answer

It sounds like it would be the filename having an improper extension.

When you save the file (in notepad or whichever program you choose) make sure to type the filename as "filename.html" WITH the quotes.

share|improve this answer

Make sure you save as filename.htm (type out the name and extension.) If you are using notepad as your editor, make sure that the "save as type" is "all files" this will allow you to use the file extension you type (.htm) or as one of the other responders mentioned you actual file might be named file.htm.txt I ran your code and it works when saved correctly.

share|improve this answer

I assume you have tried to repair/reinstall IE?

Maybe a long shot, but have you looked for adware/spyware/etc? I once encountered an adware toolbar that set itself up as a local proxy server so it could redirect all traffic to an external source which they could monitor and inject ads into the response. Because the external server couldn't reach local/intranet addresses such links failed to load properly.

Update: (uh, nevermind)

share|improve this answer
<!doctype html public "-//W3C//DTD HTML 4.0 //EN"> 
       <title>Title here!</title>


Seems like the doc type is wrong on yours...

this link will help you with doctypes for your purposes. Make sure you also have the file named properly. If that doesn't work, keep taking out code in your html and see if it works as a debugger. if you run into a section of code where it starts to work, then you know the area where your code is breaking...

share|improve this answer

Try adding a DOCTYPE

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title></title></head><body></body></html>

View the source of and you'll see the same thing.

Kinda funny ... see the link at the bottom of the page - . A site for web design questions.

share|improve this answer
Its not the doctype. – joe Aug 13 '09 at 21:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .