My html file is displayed as text on Internet Explorer not as a web page

Hi! I used Word to create the basic HTML file for my frontpage. I copy the HTML code it generated to add some more features by myself. Before adding anything I saved it as a Web Page and tried to see it on Interner Explorer. It shows my HTML program, no the result. Why? What Can I do to show the result not the code? Thank you.:frowning:

Hi newnut, welcome to SitePoint :slight_smile:

You probably need to show us a link to the web page. You can leave off the http parts and leave a space where there would be dots.

If that’s not possible, paste the code you are using here, preferably wrapping it in code tags.

Word is not a great too for setting up web pages, but at least we might be able to suggest what’s wrong.

Thank you.
I’ll try. I’m really new in all this. A very basic question: to writte the HTML program you can use any word processor and then you just save it as a Web Page and check how it looks on Internet Explorer, right? or is there any other step involved, like some special encoding or something?

It starts with this:
<html xmlns:v=“urn:schemas-microsoft-com:vml”
<meta http-equiv=Content-Type content=“text/html; charset=windows-1252”>
<meta name=ProgId content=Word.Document>
<meta name=Generator content=“Microsoft Word 12”>
<meta name=Originator content=“Microsoft Word 12”>
<link rel=File-List href=“EASY_COMMUNICATIONS_letras1_files/filelist.xml”>
<link rel=Preview href=“EASY_COMMUNICATIONS_letras1_files/preview.wmf”>
<link rel=Edit-Time-Data href=“EASY_COMMUNICATIONS_letras1_files/editdata.mso”>
<!–[if !mso]>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
<![endif]–><!–[if gte mso 9]><xml>
And I can show part of the body and the closure, if you need to. Sorry for the smilies, I don’t know whta’s that!

You can wrap the code in [code]…[/code] tags.

For example:

<html xmlns:v="urn:schemas-microsoft-com:vml"

There is a lot more to it. The code being generated by Word is really awful, so it’s hard to know where to start with this. But in reality, this is not how to go about web design.

In good web design, you have one page with all the HTML (which basically means your site content that is ‘marked up’ with tags that tell the browser whether something is a paragraph, heading etc.)

Another page (called a style sheet—otherwise known as CSS) tells the browser how the page should be styled. There are lots of good books that teach how to do this (it’s not actually very hard) and also lots of online resources. You would do online searches for—

web design basics
how CSS works
learn web design…


Sorry there is no quick fix. :sick:

Actually, I just knocked up a Word doc and clicked Save as Web Page. What it generated was certainly messy, but the page styles were embedded in the file itself.

So in reality, whatever styles you’ve set in the Word doc should be preserved in the generated file.

How did you convert the Word doc to a web page?

Ok. My idea was: first, to add to the original code originated with Word (that is, visually originated, without having to use any code myself) all the stuff that I wanted (routines, snipets, css, etc. that I could copy from somewhere else -I’m not a programer) and couldn’t add with word alone. Then partition the code generated in Stylsheet, Framesheet, Sub pages and so on. The original code works perfectly well, why, if I only Copy and Paste, my copy doesn’t work?

First, I created a .doc file, then save it as a Web Page with a .htm, then opened it with Internet Explorer, once opened, click the “page” option, went to “view source” and started copy and paste the code into a new Word document. Then I save the new document as a Web Page and tried to see it with IE. All I can see is the code!

That’s all you need to do. Why are you doing the rest? The original .htm is what you need. Just upload that via ftp to your server.

Trust us. What you’re doing will lead you to madness. :slight_smile:

First off, Word is a terrible way to generate anything Web-related. I kid you not, I took Word off my computer at home entirely, and write everything either in text documents or in HTML/CSS.

Microsoft thinks Word can generate Web pages, and it can: horrible, awful pages that look terrible and don’t work well in a browser. Microsoft also thinks it makes a good browser in Internet Explorer. It didn’t. Go with Firefox instead, or Opera or Chrome or Safari or anything except IE. And stop using Word entirely except to generate Word documents. Seriously.

If you want to whip out a quick and dirty Web site without bothering to learn HTML and CSS, you can do it by using a free page generator like Mozilla’s Seamonkey, Kompozer, or something similar. They won’t be particularly good, but they will be a lot better than anything MS Word will generate.

If you want to learn to do it the right way, there are a lot of good tutorial sites out there that will get you started. You can also learn by buying books like Sitepoint’s Build Your Own Web Site or the HeadFirst series. And you can post your questions in these forums. The only program you will need is Notepad, and you have that in Accessories.

I’d quit designing Web sites and take up crocheting before I’d do it the way you’re trying to do it. :slight_smile:

Thank you, BlacK Max. I gess I’ll change for Notepad as you suggest since nobody answers my question. I’ve read all the tutorials that I could find and have a very good idea of what I want. By the way, is it such a bad idea to have some JavaScript on it?

Answer to Ralph:

Because I want to change the structure of the “text box” for frames, with a page definig the frames and two frames, one fix and the other scrolling for the main text. I want to add a page for payments with paypal, etc., etc., etc. And I cant’ do this with Word alone.

JavaScript is not a bad thing. If you go to the JavaScript forum you will find that people advise that you do not depend on JavaScript, because your visitors may not have it. Instead, you should ensure that the page works appropriately without scripting, and then use scripting to improve the user experience.

Indeed not, but pasting html into Word and saving for the web misses the point. The html is for the backend. If you paste html into the front end, it is assumed that you want to display html.

Anyway, you may not like to have to use another editor and read books, but if you are seerious about web design, you’ll be thankful later that you took the time. To do the things you describe requires a fair bit of coding knowhow.

By the way, in reading the books and exploring further online, you’ll earn that frames are better avoided.

Aha! What you’re doing, when you modify the source, then paste it into Word to be saved as html is to create an html document whose content is the modified source.

When you modify Word’s source, don’t paste it back into Word; simply save it.



It is a bad idea if the page relies on the JavaScript - eg, if you use JS to create the menu structure, then anyone who doesn’t have JS running won’t see any kind of navigation, which is a Bad Idea™.

On the other hand, if the page works without JS but works better with the script, that’s absolutely fine and dandy - there are plenty of ways that scripts can enhance a page and improve the user experience - but the key is always to ensure that users without JS can get to all the content on all pages.

Thank you, I think now I undestand what was happening. Anyway, I’m already working on NotePad. It’s going pretty well.

I Cut the Style definitions and Pasted them in another document to add some css. ( I included all the necesary tags for head and body to make it a valid document and the link). I read in one of the tutorials that is better to have the styles defined outside of the main document in case you want to make changes latter.

I really would like to know if there’s something wrong with doing this before I finish my stylesheet. Anyone with comments?


The standard is to place your styles in a separate stylesheet and refer to it as follow:

<link type="text/css" rel="stylesheet" href="css/style.css">

I intend to use JS mainly to validate data entries. I need a registration page.