Safari displays HTML code instead of rendering page

Hello! I just got my Mac Mini and want to create a simple HTML page to display "Hello World" as a simple test.

Here is my code:

<html>
<head>
<title>Hello World</title>
</head>
<body>

Hello World


</body>
</html>

It's as simple as it gets. I save it in TextEdit as an HTML file. When I open it in Safari - it displays exactly the 8 lines as typed above - instead of "Hello World" as I would expect to see.

Using exactly the same 8 lines of code, saved in Notepad on my PC, "Hello World" is displayed in both Safari and in IE7.

I have searched for an answer to this for three days now and can't find an answer. Can anyone please tell me what I need to do to have this simple code render properly? If I can't get 8 lines to work on the Mini Mac, there is no need for me to try anything more complicated - or useful.

Thank you to anyone who can give me a clue!!

Mac Mini, Mac OS X (10.5.4)

Posted on Oct 21, 2008 3:36 PM

Reply
6 replies

Oct 21, 2008 3:58 PM in response to cdd54

Thank you for your response. I don't see an option of Plain Text. The file formats available are:
Rich Text Format (RTF)
RTF with attachments (RTFD)
HTML
Web archive
Word 2007 format (docx)
Word 97 format (doc)
Word 2003 XML format

In Notepad I change the format to "All Files" and add the .html extension to the name. It works perfectly. I assumed it would be as easy here.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Safari displays HTML code instead of rendering page

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.