Help - Search - Members - Calendar
Full Version: HTML document not opening properly in web browser
HTMLHelp Forums > Web Authoring > Web Site Functionality
Julia
I am new to creating a website and I was testing out a very basic html document to make sure I am able to see what I write in HTML translate to the web. I am on a mac using TextEdit and I use both Safari and Firefox. Here is what my very basic html document looked like:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

 
<head>
<title>First Website</title>

</head>
 
<body>
This is a test

</body>
 
</html>

I save it as index.html. I go into my web browser and I select file, open file and select the index.html document. It opens the document just fine, but it still has the html codes showing. The title does show up on the top bar.

Is there anything I need to change on my computer or the program I am using so my html document will translate to the web without the codes showing on the web?

Thanks,
Julia
pandy
You haven't saved the document the right way. See http://forums.htmlhelp.com/index.php?showtopic=9406&hl= .
Julia
I figured it out from playing around and reading your article. Thanks. Here is what I found:

You can use TextEdit, just follow these rules.

Go into textedit preferences. Then click on PLAIN TEXT under New Document. Under Open and Save check XHTML 1.0 Strict and No CSS under styling. The encoding should be unicode (UTF-8).

Then save your document. You can either do this as save or save as. Title your document as 'index.html'. Make sure that unicode (UTF-8) is selected under Plain Text Encoding toward the bottom of the save screen. Then hit save. Go into your browser and open your file. It should work.

If unicode (UTF-8) is not an option on your save window, open a new textedit window and copy and paste your file into the new window and save.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.