Html files don't work on Mac?

Discussion in 'Mac Basics and Help' started by Thumbz, Aug 25, 2011.

  1. Thumbz macrumors newbie

    Mar 3, 2011
    I made a simple .html file and ran it and instead of running the simple
    <head><title> Hello world</title></head>
    <body> Hello again </body>

    (not actual code)

    it just prints it. Does anyone know why it does this and how to fix it? I'm taking an html class and I can't do anything without learning how to fix this problem. I double checked everything for the .html extension, here's a screenshot. (

    Thanks for any and all help!
  2. blevins321 macrumors 68030

    Dec 24, 2010
    Winnipeg, MB
    Does taking out the doctype line make it display correctly?
  3. Hansr macrumors 6502a

    Apr 1, 2007
    Depending on editor it might save text files with a hidden .txt extension. Do cmd+I on the file and change file.html.txt to file.html
  4. Makosuke macrumors 603

    Aug 15, 2001
    The Cool Part of CA, USA
    This sounds most likely to me. Myself and countless other people who develop websites on OSX can attest that it can and does work fine.

    I'd recommend grabbing yourself a copy of TextWrangler (it's free from Barebones direct or the Mac App store)--very nice text editor, decent support for HTML source coloring, and it's very explicit about what character encoding it's using and how it saves files.
  5. jbushne1 macrumors newbie

    Aug 27, 2011
  6. hayesk macrumors 65816

    May 20, 2003
    Does it do this if you open it in Safari or Firefox - if so, it's probably the hidden extension thing mentioned above. If not, it's probably a Chrome setting.

Share This Page