• Welcome to The Cave of Dragonflies forums, where the smallest bugs live alongside the strongest dragons.

    Guests are not able to post messages or even read certain areas of the forums. Now, that's boring, don't you think? Registration, on the other hand, is simple, completely free of charge, and does not require you to give out any personal information at all. As soon as you register, you can take part in some of the happy fun things at the forums such as posting messages, voting in polls, sending private messages to people and being told that this is where we drink tea and eat cod.

    Of course I'm not forcing you to do anything if you don't want to, but seriously, what have you got to lose? Five seconds of your life?

How to view HTML files on Safari

NismoZ

I don't know what to put here.
I need help with it. I can't get anything but source code, and it's a perfectly valid document.
 
Since I'm just starting out, I made the page have a title of "Something here" and the page itself say "Some stuff here". It shows the entire code of the HTML instead.
 
Um, he already described his problem. He has an HTML file on his computer; he's opening the file in Safari; and instead of it showing the rendered page, it shows the source code as if it were a text file. I'm not sure what else he should be including.

Anyway, I don't know much about Safari, but did you definitely save it with an HTML file extension, e.g. .htm or .html?
 
My friend took a web design class last year, and he noted the same problem on his Mac. I think he was using Firefox, but maybe not. Are you using a Mac?

Try saving as txt to begin with, then change the file type to html (or htm, if you feel like it).
 
Are you sure ".html" (or ".htm") is the actual extension and not just in the filename? In other words, if your file is site.html, are you sure it's not site.html.txt or something like that?
 
Um, he already described his problem. He has an HTML file on his computer; he's opening the file in Safari; and instead of it showing the rendered page, it shows the source code as if it were a text file. I'm not sure what else he should be including.

Anyway, I don't know much about Safari, but did you definitely save it with an HTML file extension, e.g. .htm or .html?

uh, that sounds like it fits what the OP is having trouble with, but I'm still confused.

in any case, I know of three ways something could go wrong like that on a mac without doing something horribly contrived:

  • the extension thing
  • typing in source code and using save as html which will create an html file, but not quite what you'd want. of course, he'd have to be using something like the default textedit, but.
  • trying to type html into a wysiwyg. not that likely.

EDIT: some silly editors will attempt to generate html if you save with extension html. specify which editor you're using?
 
Which program are you using to write the HTML file? I'm typing this on a mac, and I use TextWrangler (free download) and Safari for all my web design needs. Also, whenever I use save as I just type in "xxx.html" and it saves it as a html document. Try that, maybe?
 
Anyway, I don't know much about Safari, but did you definitely save it with an HTML file extension, e.g. .htm or .html?
The filename was index.htm

My friend took a web design class last year, and he noted the same problem on his Mac. I think he was using Firefox, but maybe not. Are you using a Mac?
Yes, I am using a Mac.

Are you sure ".html" (or ".htm") is the actual extension and not just in the filename? In other words, if your file is site.html, are you sure it's not site.html.txt or something like that?
As said above, the specific filename was index.htm. I made sure that it wouldn't make it a text document by choosing "HTML document" in the dropdown and unchecking the "Hide extension" box.

Which program are you using to write the HTML file?
I'm using TextEdit.
 
If I remember correctly, TextEdit is the program I attempted to use the one time I've seriously tried to work on a Mac and concluded after about two hours of trying to get it to open an HTML file in plaintext mode and keep it that way that it was impossible.

When you save it as an "HTML file", that's probably in that program's unimaginably silly pseudo-WYSIWYG that has probably encoded all your brackets as < and > or something equally stupid. Get a proper plaintext editor that has absolutely no capacity to display images or fancy formatting and try it again.
 
Back
Top Bottom