HTML issue?

Discussion in 'Mac Apps and Mac App Store' started by MBP123, Sep 27, 2007.

  1. MBP123 macrumors regular

    Joined:
    May 26, 2006
    #1
    i feel really dumb as i used to do HTML stuff in high school, but whenever i write something, no matter how basic in textedit, and then save it and open it up in safari, it just displays the source code instead of what it should be.

    <html>
    <title>My HomePage</title>
    <body>Stay tuned for updates!</body>
    </html>

    And instead of going to the page and it just saying "stay tuned for updates", it displays everything you see there. And i saved it as an html file and everything.

    how stupid am i?
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    If we ignore the fact that you have written invalid HTML are you sure you saved it as an HTML file not an .html.rtf or .html.rtfd file? TextEdit defaults to rich text mode unless you tell it otherwise. If you open the file in TextEdit and get the toolbar with formatting options it's rich text, not html. In this case you need to convert to plain text via Format->Make Plain Text and re-save ensuring TextEdit does not add any additional file type suffix to the file name.
     
  3. overanalyzer macrumors 6502a

    Joined:
    Sep 7, 2007
    Location:
    Boston, MA USA
    #3
    if nothing else, you need a head tag around the title.
     
  4. MBP123 thread starter macrumors regular

    Joined:
    May 26, 2006
    #4
    i told it to do just plain text, as you can see from the prefs screen shots below. and its saved to my desktop as index.html
     

    Attached Files:

  5. MBP123 thread starter macrumors regular

    Joined:
    May 26, 2006
  6. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    Erm cool. Any chance you could post what the resolution was in case anyone else encounters this and finds this thread via a search?
     

Share This Page