The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> HTML document not opening properly in web browser
Julia
post Aug 1 2009, 06:14 PM
Post #1





Group: Members
Posts: 3
Joined: 1-August 09
Member No.: 9,304



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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 1 2009, 06:16 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



You haven't saved the document the right way. See http://forums.htmlhelp.com/index.php?showtopic=9406&hl= .
User is online!PM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Julia
post Aug 1 2009, 06:57 PM
Post #3





Group: Members
Posts: 3
Joined: 1-August 09
Member No.: 9,304



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 09:20 AM