.html not recognized - MAC OS 10.5/Safari default browser

Discussion in 'HTML' started by kquirici@gmail.com, Sep 1, 2008.

  1. Guest

    Hi,

    This is a frustrating problem with probably an easy solution.
    I'm cross-posting to a MAC group also.

    I'm on MAC OS 10.5. I have Safari set up as my default
    web browser.

    When I save a web page to my desktop and
    double-click it, it pops up in the Safari browser
    as one would expect.

    However when I try to double-click an html I've created myself
    called kmq1.html. it brings up a text editor.

    But if I choose the option (from right-clicking the file icon)
    it opens in Safari fine.

    Why isn't my html recognized? The icon for the file is
    the standard html icon.

    Thanks.

    Ken

    ----Here's the html. It's simple enuf.

    <!DOCTYPE HTML PUBLIC "-//W3C//DD HTML 4.0 Transitional//EN" >
    <html lang=”en-US”>
    <head>
    <title>Title of page</title>
    <h3>This is h3</h3>
    <h2>This is h2</h2>
    <h1>This is h1</h1>
    <h4>This is h4</h4>
    <hr><br>
    <br>
    <!— This is a comment —>
    <! This is a comment >
    <! This is a comment />
    <h5>This is h5</h5>
    <h1>This is h1</h1>
    <p>this is a paragraph<br>with a break in the heading <br>area</p>
    </head>
    <hr>
    <body>
    This is my first homepage. <b>This text is bold</b>
    <p>this is a paragraph in the body </p>
    <a name=”targetx1”>heres the target of the link in kmq5.html</a>
    <p>
    how can this possibly work?
    </p>
    </body>
    <hr>
    </html>
     
    , Sep 1, 2008
    #1
    1. Advertising

  2. David Guest

    wrote:
    > Hi,
    >
    > This is a frustrating problem with probably an easy solution.
    > I'm cross-posting to a MAC group also.
    >
    > I'm on MAC OS 10.5. I have Safari set up as my default
    > web browser.
    >
    > When I save a web page to my desktop and
    > double-click it, it pops up in the Safari browser
    > as one would expect.
    >
    > However when I try to double-click an html I've created myself
    > called kmq1.html. it brings up a text editor.
    >
    > But if I choose the option (from right-clicking the file icon)
    > it opens in Safari fine.
    >
    > Why isn't my html recognized? The icon for the file is
    > the standard html icon.
    >
    > Thanks.
    >
    > Ken
    >
    > ----Here's the html. It's simple enuf.
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DD HTML 4.0 Transitional//EN" >
    > <html lang=”en-US”>
    > <head>
    > <title>Title of page</title>

    </head> -- Place the head end tag here
    > <h3>This is h3</h3>
    > <h2>This is h2</h2>
    > <h1>This is h1</h1>
    > <h4>This is h4</h4>
    > <hr><br>
    > <br>
    > <!— This is a comment —>
    > <! This is a comment >
    > <! This is a comment />
    > <h5>This is h5</h5>
    > <h1>This is h1</h1>
    > <p>this is a paragraph<br>with a break in the heading <br>area</p>
    > </head>

    I would move this head to the top
    > <hr>
    > <body>
    > This is my first homepage. <b>This text is bold</b>
    > <p>this is a paragraph in the body </p>
    > <a name=”targetx1”>heres the target of the link in kmq5.html</a>
    > <p>
    > how can this possibly work?
    > </p>
    > </body>
    > <hr>
    > </html>
    >
    >


    The rest of the page looks fine for now. The problem isn't with your
    html file but rather the file association within your OS/10.5. Do the
    following to change it:

    Select one of the files in Finder, then do apple-i. This is Get Info,
    and brings up a property sheet on the file. In that window you should
    see a section named "Open With". Choose Safari or whatever.

    I Hope this is of some help.

    Cheers
     
    David, Sep 1, 2008
    #2
    1. Advertising

  3. Ari Heino Guest

    Ari Heino, Sep 1, 2008
    #3
  4. David Guest

    Ari Heino wrote:
    >>> </body>
    >>> <hr>

    >
    > Remove any content outside body, hr in this case.
    >
    >>> </html>

    >

    That is correct. I missed that part of the code. But that isn't the
    problem. I hope the file association within that file and the OS 10.5
    will fix his problem.

    Good eye there with the <hr> outside of the <body> tag.

    Cheers
     
    David, Sep 1, 2008
    #4
  5. Gus Richter Guest

    wrote:
    >
    > ----Here's the html. It's simple enuf.


    Simple and yet full of basic errors.

    You should not be using a Transitional Doctype and you should be using
    html 4.01 instead of html 4.0
    All new documents should be using a STRICT Doctype Declaration.
    Use this one:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

    You have illegal elements in the head section.
    The only permissable items in the head section are comments and the
    following elements:
    script, style, meta, link, object, title and base
    In your example, the only line in the head section should be:
    <title>Title of page</title>
    The rest should be in the body section.

    Anything between the closing head tag and opening body tag is illegal. i.e.
    </head>
    <hr>
    <body>
    Anything between the closing body tag and closing html tag is illegal.
    </body>
    <hr>
    </html>
    Both of the <hr> should be in the body section.

    Your 3 comment versions are wrong. Only this one is correct:
    <!-- Only this is a comment -->

    I recommend some reading of:
    <http://www.w3.org/TR/html4/>
    Further reading recommended:
    <http://www.w3.org/TR/CSS21/>

    --
    Gus
     
    Gus Richter, Sep 1, 2008
    #5
  6. dorayme Guest

    In article
    <>,
    wrote:

    > I'm on MAC OS 10.5. I have Safari set up as my default
    > web browser.
    >
    > When I save a web page to my desktop and
    > double-click it, it pops up in the Safari browser
    > as one would expect.
    >
    > However when I try to double-click an html I've created myself
    > called kmq1.html. it brings up a text editor.
    >
    > But if I choose the option (from right-clicking the file icon)
    > it opens in Safari fine.
    >
    > Why isn't my html recognized? The icon for the file is
    > the standard html icon.


    To the last first: because it is normally a good idea to have it open in
    your favourite text editor. You can choose which program to open such
    files (including your favourite text editor)

    1. Highlight file,

    2. File/Get Info or Command + I or, in column directory view, click the
    More info button or even try control or right click to get a context
    menu and chose Get Info (so many ways!)

    3. Go down to the "Open with" and click arrow to reveal options

    4. Use scroll menu with little arrows to *Choose* the prgm you want

    5. Make sure you then press the Change All button under the words "Use
    this application to open all documents like this"

    Perhaps you don't know that simply dragging the file icon or name over
    any browser icon or even over any open browser window (under most
    circumstances - does not work if you are viewing a pdf in your browser
    window!) makes the file produce a webpage.

    What program you choose to open in as default depends on your work. It
    is natural and rather more reasonable for a website developer to have
    double click open it in a text editor so he can edit and/or inspect the
    code straight away.

    Yes, you could choose as default a browser, and when wanting to edit,
    you could then drag file over a text editor or use the Get Info panel
    and Open With *without* pressing the Change All button.

    But the two strategies are not quite symmetrical or as convenient as
    each other. Here is one reason: if it opens in a browser and then you
    want to edit, you can inspect the source via View Source menu item but
    then you cannot edit.

    True, you could then open the source by returning to the file and
    opening it as a one off special in a text editor or by dragging to a
    text editor icon.

    Here are some other things that might assist you to know. In iCab, you
    can set your own text editor to View Source so you could have best of
    both worlds by opening as default in iCab and a simple Command + 8 will
    get you the file open in your favourite editor. But that is iCab, not
    Safari.

    By the same token, some editors have the mirror capacity to this last.
    In BBEdit, for example, you can set the browsers you want the file to
    display as web page in and there are buttons and things to make this
    easy.

    Do what you find easiest for your situation. You might well find it more
    convenient to have double click open the text editor and use many other
    simple means for opening in browsers rather than the other way around
    when you have a lot of website work to do.

    For one thing, you tend to use one editor but many browsers!

    --
    dorayme
     
    dorayme, Sep 2, 2008
    #6
  7. David Guest

    >David wrote:
    >
    > Select one of the files in Finder, then do apple-i. This is Get Info,
    > and brings up a property sheet on the file. In that window you should
    > see a section named "Open With". Choose Safari or whatever.
    >
    > I Hope this is of some help.
    >
    > Cheers

    Hello there Ken,
    I am glad you have figured out how to do this. But I just wanted to
    point out that the first post regarding this issue solved the problem.

    Even though your html wasn't perfect, it still would have displayed
    something. The only thing that would cause an issue like this
    is file -> application association.

    It is correct though if you right click on a file on your desktop
    or other places and choose open with - it will only do it once.
    You have to press Apple I (more info) and change the application
    association manually to keep it from doing that again.

    Glad you got it all figured out.
    By the way, what mac group were you working with?

    Cheers
     
    David, Sep 2, 2008
    #7
  8. dorayme Guest

    In article <200809021956298930-kquirici@yahoocom>,
    ken quirici <> wrote:

    > > Do what you find easiest for your situation. You might well find it more
    > > convenient to have double click open the text editor and use many other
    > > simple means for opening in browsers rather than the other way around
    > > when you have a lot of website work to do.

    >
    > Well you've presented the two strategies neatly.
    >
    > Now I have to choose. Or not. :)


    It is interesting to think what the not choosing might come down to in
    practice? Perhaps it means leave things at default (which is what you
    had before). But then, if it really means this, what is the difference
    between choosing and not choosing? :)

    --
    dorayme
     
    dorayme, Sep 3, 2008
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2FtMjAwMA==?=

    Can Mac Users With safari browser see the site with ASP.net

    =?Utf-8?B?U2FtMjAwMA==?=, Jul 22, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,618
    Juan T. Llibre
    Jul 22, 2005
  2. mg
    Replies:
    0
    Views:
    106
  3. Microsoft Centre Of Excellence

    List Box Control on Safari browser on Mac

    Microsoft Centre Of Excellence, Nov 16, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    240
    Microsoft Centre Of Excellence
    Nov 16, 2004
  4. JD

    Working with Mac Safari Browser

    JD, Jul 15, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    154
    theath
    Jul 15, 2005
  5. Foreman
    Replies:
    5
    Views:
    225
    Foreman
    Jan 25, 2005
Loading...

Share This Page