Results 1 to 10 of 10
  1. #1


    Member Since
    Jun 28, 2008
    Posts
    5
    previewing web pages in Safari
    I am a beginner and I just bought a html book to get started. (Elizaeth Castro, 'visual quickstart guide' 6.ed). I have created a web page using TextEdit and have saved the file as .html. When I open the file in Safari the page will not display as a web page but only shows me the html code. I'm hoping to build upon this modest start but am stuck already.
    Here's what I've got so far.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="http://www.w3.org/1999/xhtml">
    >
    > <head>
    > <meta-equiv="content-type" content="text/html; charset=utf-8"/>
    > <title>
    > My Title
    > </title>
    > </head>
    >
    > <body>
    > <h1>Interests</h1>
    > <p>Likes to play guitar and sing.</p>
    > <h2>Favorite Guitar</h2>
    > <p>My favorite guitar is an early seventies Les Paul.</p>
    > </body>
    > </html>

    Thanks for any help,

    Paperclip

  2. #2

    louishen's Avatar
    Member Since
    Oct 22, 2007
    Location
    London
    Posts
    8,968
    Specs:
    Mac Mini Core i7 2012 | White 2009 MacBook 2 Ghz | 733 Mhz G4 Quicksilver
    It works fine if you take all those > from the beginnings of each line

  3. #3

    skaheadpunk's Avatar
    Member Since
    Jan 12, 2008
    Location
    Leicester, England
    Posts
    1,760
    Specs:
    MacBook, iPod Classic, 8GB 3G iPhone, Time Capsule
    I think I had to save as .htm to make it display properly...

  4. #4


    Member Since
    Jun 28, 2008
    Posts
    5
    safari still won't preview my web page
    Thanks Louishen and Skaheadpunk for your response. I feel encouraged that the code works on your browsers. I removed the > from the beginning of each line but it still does not work. (Those > signs must have got put there by TextEdit when I copied and pasted the file as I did not put them when I wrote the html.) TextEdit will not let me save the file as htm - only html.
    I'm open to suggestions.

    Paperclip

  5. #5

    skaheadpunk's Avatar
    Member Since
    Jan 12, 2008
    Location
    Leicester, England
    Posts
    1,760
    Specs:
    MacBook, iPod Classic, 8GB 3G iPhone, Time Capsule
    When you go to save as and type the filename, whack .htm on the end, then it asks you which extension you want to use, stick with .htm. Works for me!

  6. #6


    Member Since
    Jun 28, 2008
    Posts
    5
    previewing web pages in safari with .htm
    Thanks for your help Skaheadpunk. TextEdit does not want me to save the file with an htm extension. I get an error window that only allows html or the use of both htm and html like this .htm.html. I saved the file with both extensions and then removed the html at the end. Safari still won't display the page as a web page.
    I then saved the file in MS word 2004, with the file extension htm. I used both the 'save as' and 'save as a web page' options and tried both. Safari will not dispay the file as a web page. I'm really stumped.


    Paperclip

  7. #7

    moethejoey's Avatar
    Member Since
    Jul 22, 2008
    Location
    Brecon, Wales
    Posts
    8
    textedit options
    Hi Paperclip
    I had the same problem. This is what solved it:
    Go into Textedit preferences
    Select 'Plain text' in the Format section.
    Close and restart Textedit
    Copy and paste your original text into a new document in textedit
    Select save as and put filename.html into the top box
    in the dialogue box accept .html as the extension

    the file then displayed correctly in Safari for me when i opened it. hope this helps
    Moe

  8. #8

    ki99's Avatar
    Member Since
    May 31, 2007
    Location
    Ontario, Canada.
    Posts
    926
    Specs:
    Macbook(W) 2GHz, 80GB HD, 1G RAM, Windows XP
    follow the above post. when textedit is in richtext mode is has a neat feature (that always tends to trip up people learning to code html in it) but you can create a normal document, and save it as html to view on the web without having to write your own code. but as stated above, if you change it to plain text, you should find yourself having no problems.

  9. #9

    moethejoey's Avatar
    Member Since
    Jul 22, 2008
    Location
    Brecon, Wales
    Posts
    8
    and a bit more...
    yes further to all two previous posts, if you go to the 'Open and Save' tab under TextEdit preferences and check the 'Ignore rich text commands in html files' as well, the page should load correctly in a web browser but appear as editable text in TextEdit.

  10. #10


    Member Since
    Jun 28, 2008
    Posts
    5
    safari now previews my web page
    Thanks Moe for your suggestion. Your solution worked. Thanks to all who contributed to this post.

    Paperclip

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How in Safari to alternate open web pages
    By rockmastermike in forum Switcher Hangout
    Replies: 5
    Last Post: 11-22-2009, 06:27 PM
  2. Web pages in Safari -- can't access some menus
    By Straitsfan in forum OS X - Operating System
    Replies: 3
    Last Post: 10-15-2008, 07:45 PM
  3. Converting Safari Web Pages to HTML? Please help!
    By tears2040 in forum Switcher Hangout
    Replies: 3
    Last Post: 04-19-2008, 09:43 AM
  4. Open Web pages in Safari
    By zyepod in forum Switcher Hangout
    Replies: 5
    Last Post: 01-27-2008, 01:48 AM
  5. Safari caching web pages . . .
    By DrQuincy in forum Web Design and Hosting
    Replies: 3
    Last Post: 11-20-2006, 07:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •