Saving text as HTML in Sites (Mac)

I have the Build Your Own Website the Right Way (2nd Edition). I’m on chapter 2 building a second mock site (local diving club). The basic.html (1st mock site) file I saved with Text/Edit in Sites opens up as a website form, not code. The instructions in the book for starting the local diving club site is to first open the basic.html file and edit it to make the second site. But the code doesn’t show up! Only the finished product does…I know there’s a way to save code and be able to retrieve it as code…but HOW? I don’t want to have to constantly type it out all over again…Help!!

-Yana

Hi diodenko. Welcome to SitePoint. :slight_smile:

I’m not quite clear on what you are doing here. Are you using the Mac program called TextEdit? If so, you may need to change the preferences in that program for it to work for you as a code editor.

Go to TextEdit > Preferences and in the New Document tab, choose

Format: plain text

and in the Open and Save tab, choose

When opening a File:

  • ignor rich text commands (both options)

and choose other settings in that tab appropriate for html files.

Does that help?

If not please describe in more detail what is happening, and rather than say things like “opens up as a website form”, say exactly what you mean, as I don’t understand what that means.

YES! That is exactly what was wrong with my TextEdit. I was impatient for responses so I played with the Preferences and was able to figure it our shortly after posting the question. Thank you for responding Ralph!

Great. I would now suggest you try out some more purpose-built code editors. There are some free ones if you don’t want to pay for one. Some examples include:

Text-wrangler
KompoZer
Komodo edit
Crea:text
macVim
Fraise
Aptana Studio
NetBeans
CoffeeCup