|
Posted by Chris Beall on 12/04/05 06:21
dorayme wrote:
>>From: Chris Beall <Chris_Beall@prodigy.net>
>>On Windows, I use Notepad to create HTML from scratch.
>>
>>Today my daughter asked me what to use on a Mac. Apparently she has
>>tried several tools, but has not been able to get any to work. As I
>>understand her problem, she can create text files, but they continue to
>>be recognized as only text files, even if given an .html extension. I
>>vaguely recall that Mac uses a 'signature' or something other than the
>>file extension to define the type of a file, but...
>>
>>Can anyone identify a standard (part of an Apple iBook preload) editor
>>that can be used to create HTML files? If there's a trick to doing so,
>>please describe the details, as I have no system with which to experiment.
>>
>
>
> Source code /is/ just text. And it does not matter what you
> append on a Mac name in regard to what program it will open in;
> double clicking will open the file according to the creator and
> file type (this is "under the bonnet" and you need to read up on
> this stuff, if you really want to know more ask further... I
> will say this here: you /could/ get one of the many facilities
> for changing the type of the text file so that it then "becomes"
> an IE file or a Mozilla or iCab or Safari or Opera or whatever.
> Then it will open in the specified browser. But I would not
> advise this. The point about the source text is that it is
> independent of any particular browser. Leave it that way! It is
> then easy to modify and available in the text editor program you
> prefer to work in.
>
> In the meantime your daughter will do this: She will create a
> text file (Simpletext or whatever will do) and append the .html
> after it (this is for a different purpose to /merely/ opening
> the file) and drag the file with the mouse over any open browser
> window or any browser app icon. Or (more bothersome) open a
> browser and use file/open and then find the text file concerned
> and it will express itself as a website page in the browser.
>
> The best text edtor in my opinion for this sort of work is
> BBEdit or its descendants from Barebones. But Simple Text or
> whatever is the simple text editor on your daughter's Mac should
> be ok.
>
> -- dorayme
>
dorayme,
OK, I think I'm getting closer. Let me repeat what I think you said and
see if I got it right.
Let's take the simplest case possible: I want to create a new web page
from scratch. Keep in mind that I have no Mac in front of me and don't
know the correct terminology, so I'll use Windows terms and you can
correct me where the Mac terms are different.
I open Simpletext and create a New file. I type in my HTML. I Save the
file, naming it xxx.html.
At this point, although I've NAMED the file xxx.html, it is still just
TEXT to the Mac OS. Unlike Windows, which associates file extensions
with an executable program, Mac has a separate function to do this.
Simpletext itself does not contain the logic to do this, i.e. I can't
say Save As HTML from within Simpletext.
Instead, I can either:
1. Drag and drop the file on the application that I want to associate
it with, in this case Safari.
2. Open the application I want to associate the file with, then, using
that application, do a File, Open and select the target file.
This will establish the association for THAT SPECIFIC FILE, but will NOT
define an association for all files with the same file extension (unlike
Windows).
Once I've established this association, I can then just click on this
file in the future and it will, by default, open in Safari.
OK, how far off base am I?
Thanks,
Chris Beall
[Back to original message]
|