MozillaZine

HTML Rendering on MAC

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Bruce_G
 
Posts: 6
Joined: November 26th, 2014, 6:36 am

Post Posted November 26th, 2014, 6:49 am

I'm sorry if this is not the right place to ask this, but can someone explain why Firefox won't render even the simplest HTML files? It's been nearly 20 years since I've written a webpage in HTML, so I'm a bit rusty. My goal is actually to test a simple javascript, but I can't even get a simple webpage open. When I open the following HTML files in Firefox (downloaded from tutorial pages), I see a printout of the HTML script:

Example 1: Hello_world_2.html
<html>
<header><title>This is title</title></header>
<body>
Hello world
</body>
</html>

Example 2: Hello_world_3.html
<HTML>
<HEAD>
<TITLE>Hello, World Page!</TITLE>
</HEAD>
<BODY>
Hello, World!
</BODY>
</HTML>

Example 3: Hello_world_4.html
!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
<HEAD>
<TITLE>
A Small Hello
</TITLE>
</HEAD>
<BODY>
<H1>Hi</H1>
<P>This is very minimal "hello world" HTML document.</P>
</BODY>
</HTML>

trolly
Moderator

User avatar
 
Posts: 39905
Joined: August 22nd, 2005, 7:25 am

Post Posted November 26th, 2014, 7:14 am

How do you open them?
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.

Bruce_G
 
Posts: 6
Joined: November 26th, 2014, 6:36 am

Post Posted November 26th, 2014, 9:43 am

trolly, thanks for the reply.

1. Double click.
2. Right click/open with/Firefox
3. Drag & drop into Firefox window.

trolly
Moderator

User avatar
 
Posts: 39905
Joined: August 22nd, 2005, 7:25 am

Post Posted November 26th, 2014, 10:00 am

Did you try File->Open File?

I can only test with Windows and there it works as intended.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.

Bruce_G
 
Posts: 6
Joined: November 26th, 2014, 6:36 am

Post Posted November 26th, 2014, 10:11 am

Thanks again.

It's the same. Using all methods, I end up with a hard drive based URL in the address bar and a printout of the script.

And thank you for clarifying. I should have included that I am working on a Mac.
I just tried it in a Windows 7 VM and got the same result.

Bruce_G
 
Posts: 6
Joined: November 26th, 2014, 6:36 am

Post Posted November 26th, 2014, 10:20 am

I think I found the answer:

A file that looks like this in Mac TextEdit or Open Office:

<HTML>
<HEAD>
<TITLE>Hello, World Page!</TITLE>
</HEAD>

<BODY>
Hello, World!
</BODY>
</HTML>

Looks like this in Windows Wordpad:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1187.4">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier; min-height: 14.0px}
</style>
</head>
<body>
<p class="p1">&lt;HTML&gt;</p>
<p class="p1">&lt;HEAD&gt;</p>
<p class="p1">&lt;TITLE&gt;Hello, World Page!&lt;/TITLE&gt;</p>
<p class="p1">&lt;/HEAD&gt;</p>
<p class="p2"><br></p>
<p class="p1">&lt;BODY&gt;</p>
<p class="p1">Hello, World!</p>
<p class="p1">&lt;/BODY&gt;</p>
<p class="p1">&lt;/HTML&gt;</p>
</body>
</html>

Bruce_G
 
Posts: 6
Joined: November 26th, 2014, 6:36 am

Post Posted November 26th, 2014, 10:24 am

I should add that's the downside of using a Mac. It does all of these amazingly cool things for you in the background whether you want it to or not.

trolly
Moderator

User avatar
 
Posts: 39905
Joined: August 22nd, 2005, 7:25 am

Post Posted November 26th, 2014, 12:30 pm

Well, seems you wrote HTML inside of HTML. ;-)
Probably it was converted when you selected HTML as output.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.

Bruce_G
 
Posts: 6
Joined: November 26th, 2014, 6:36 am

Post Posted November 27th, 2014, 6:27 am

Yeah. Silly me, thinking that the Macintosh TextEdit program might actually function as a text editor. How embarrassing.

Return to Web Development / Standards Evangelism


Who is online

Users browsing this forum: No registered users and 2 guests