How to view TextEdit file as a webpage

Discussion in 'Mac Apps and Mac App Store' started by *charley*, Dec 31, 2008.

  1. *charley* macrumors newbie

    Dec 31, 2008

    I'm sorry if this is a stupid question but here's my problem:

    I want to create a webpage using TextEdit, so I typed in some html code, and saved the file as .html

    Then (without uploading the file to the internet) I opened Firefox and hit file>open and selected my file, expecting to see the actual webpage. But instead all I saw was the html source code. This was the same in Safari.

    When I used to build websites using Notepad on the PC, you could view your pages without uploading, since the files were on your computer. Is this possible on the mac? I need to view as I go to check that my code is working right, but I don't really want to upload until the page is working perfectly.

  2. Mal macrumors 603


    Jan 6, 2002
    Make sure you didn't save it as rich text, and that it didn't append a hidden extension to the end of the file name (usually it won't if you added the .html on the end though). The rich text thing gets a lot of people.

  3. miles01110 macrumors Core


    Jul 24, 2006
    The Ivory Tower (I'm not coming down)
    If Mal's suggestion doesn't work, make sure you've formatted your HTML correctly. Like make sure you have the html and body tags, etc...

    For a more permanent solution, I'd recommend an actual html editor or a text editor that supports html tagging (Textmate, BBEdit, etc). You can find open source ones with google (I think Nvu is one of them).
  4. *charley* thread starter macrumors newbie

    Dec 31, 2008

    Thanks guys! It was the rich text thing - despite the .html file extension there was something about ignoring rich text commands which needed checking in the Preferences menu.

    *Yay* - freedom from the PC at last - using Notepad was the last thing I was still clinging to!

Share This Page