Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Introduction First Steps

I do not see anything when I open Safari and the the file I saved have an .rtf extension that I can't change

anyone who can help

2 Answers

nico dev
nico dev
20,364 Points

Hi Asad,

Ideally, like Nick said, use Notepad (if you're in Windows) or TextEdit (if you're on a Mac), or otherwise any plain-text editor (not one that applies advanced formatting tools, etc.).

Then, again, if you already saved it as .RTF, you should still be able to right-click on the file, select Rename, and give it a new name, and you should name it index.html. Another option is to just click once in the name, then click again (not a double-click, but two single ones); that should make it possible for you to change the name.

If you're not successful with none of the above, just delete the file. And then go to Notepad/TextEdit (you should have at least one of those) and create a new file. Then make sure not to choose the Save option, but "Save as", and there you can change the name to index.html.

Hope that helps!

nico dev
nico dev
20,364 Points

Sorry that I answer again, but I guess I found out what is your problem.

I found the following explanation here :


Create your HTML document by writing the HTML codes in TextEdit. When you are ready to save do not choose "Web Page" in the file formats drop-down menu. If you choose this, all of your HTML codes will appear on the page.

  1. Go to the Format menu and choose “Make Plain Text.” You can also use the shortcut key Shift+Cmd+T.
  2. Save the file with an .html extension. Then you can edit the file in any other text editor as plain HTML. However, if you want to edit it in TextEdit later, you need to change TextEdit preferences.
  3. If you don't change the TextEdit preferences, TextEdit opens your HTML file as an RTF file, and you lose all the HTML codes.

To change the preferences:

  1. Open TextEdit and choose “Preferences” from the TextEdit menu.
  2. Switch to the “Open and Save” tab.
  3. Mark the check box in front of “Display HTML files as HTML code instead of formatted text.”

It helps to change TextEdit's default to text files instead of rich text if you use it to edit HTML a lot. To do this, switch back to the “New Document” tab and change the Format to “plain text.”

I hope (and trust) that will help you solve your issue. Keep on coding!