Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MBP123

macrumors regular
Original poster
May 26, 2006
192
0
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?
 
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.
 
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.

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
 

Attachments

  • Picture 1.png
    Picture 1.png
    54.9 KB · Views: 60
  • Picture 2.png
    Picture 2.png
    53.3 KB · Views: 49
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.