Viewing HTML in Firefox querie

Messages
8,400
Name
Andy
Edit My Images
No
I am trying to design a website on my Mac in the TextEdit text editor by typing out the HTML but when i save as an HTM or HTML file and click on it i get firefox opening and showing not only the text on the page but the tags as well. It should just show the text that i have written and not all the <body> tags etc.

What am i doing wrong? Should i use a proper HTML text editor?

I tried iWeb but it really is poo. Are there any other free web design tools out there for my Mac?

Cheers

Andy
 
Have downloaded TextWrangler but can't view the code in Firefox.

Why is this so bloomin difficult :bang::bang::bang::bang::bang:

I have been designing websites for nearly 10 years (not in text editors!) and this is just daft unless there's something i have missed????:D
 
Obvious question.

Have you included the DOCTYPE stuff and the <html> tags?
 
Can you give us the example code you've done?

Quite possible that textedit has a default filename of .txt, that you cant see, when you save it as page.htm, its actually page.htm.txt, thus you can see the html tags. Can you view file types as well as filenames and can save it in textedit as the file type you want?
 
Here is what i am trying:

<html>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>

</body>
</html>

also tried with <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Seems to kinda work but get loads of weird text on the firefox page.

Now that i'm using Text Wrangler every time i double click on the htm page it just comes up in Text Wrangler edit page and i don't know how to view it in firefox.

I have copied a page source (old web page done in dreamweaver) and pasted it into TextEdit and it won't let me save as either HTML or HTM it will only save as .rtf

What the hell is going on? I have just opened a free web page with geocities (BT Yahoo) and that won't let me design a page either as it keeps asking me to sign in as there was an error but i'm already signed in.
 
Try this code:

Code:
<?xml version="1.1" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
	<head>	
		<meta http-equiv="Content-type" content="application/xhtml+xml; charset=UTF-8" />	
		<title>Test page
		</title>
	</head>
	<body>
		<h1>My First Heading</h1>
		<p>My first paragraph.</p>		
	</body>
</html>
 
Right.... managed to save the following in TextEdit as a HTML file but still shows all tags etc in firefox

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>West, West, West &amp; West photography</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<p><font size="4" face="Verdana, Arial, Helvetica, sans-serif">www.cobraworkshop.co.uk</font></p>
<p><font size="4" face="Verdana, Arial, Helvetica, sans-serif">New site coming
soon.....ish</font></p>
<p align="center"><font color="#669999" size="5" face="Verdana, Arial, Helvetica, sans-serif">West, West, West &amp; West Photography</font></p>

</body>
</html>
 
I presume there's a way to show a context menu in Mac OS X, if you have a single button mouse, then it should be on the keyboard or there's a shortcut for it.

What's a context menu?
 
Try this code:

Code:
<?xml version="1.1" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
	<head>	
		<meta http-equiv="Content-type" content="application/xhtml+xml; charset=UTF-8" />	
		<title>Test page
		</title>
	</head>
	<body>
		<h1>My First Heading</h1>
		<p>My first paragraph.</p>		
	</body>
</html>

Still shows exactly whats written above in firefox????????:bang::bang::bang::bang::bang::bang::bang:
 
Works fine for me. You obviously aren't saving it as an htm or html document.
 
Works fine for me. You obviously aren't saving it as an htm or html document.

When i save the Textedit file there is a HTML option in the drop down menu. I choose this option and it saves the file but no extension shows in finder. I presume seeing as i chose HTML that it will save it as HTML in finder.

This is driving me nuts. I must have done something wrong but i can't fint what and where.

This is just the sort of thing that made me send back the other mac. And this may go the same way!:bang:
 
Just download a proper html editor or something. I'm sure in your 10 years experience you've come across a couple of decent ones?

It's not really a reason to send back a mac.
 
Just download a proper html editor or something. I'm sure in your 10 years experience you've come across a couple of decent ones?

It's not really a reason to send back a mac.

Don't worry, it's not going back! :lol: It just annoys me when you can't do a simple job.

So what FREE editor would you suggest?
 
Try this to see if it really is an htm document - http://www.fileinfo.com/help/mac-show-extensions.html

and for a context menu http://en.wikipedia.org/wiki/Context_menu

:)

Here is an image of the info:
Picture_11.png


And heres what i get when i double click on the html file:

Picture_2.png
 
PHEW!

All sorted. I downloaded KOMPOZER for the WYSIWYG web design package and FireFTP add on for Firefox so all is cool once again!

Don't know why the text editing didn't work??? I'll have to work that one out another day:D
 
PHEW!

All sorted. I downloaded KOMPOZER for the WYSIWYG web design package and FireFTP add on for Firefox so all is cool once again!

Don't know why the text editing didn't work??? I'll have to work that one out another day:D

As somebody else pointed out, you probably didn't format the tags correctly or didn't save it as .html

I use emacs or notepad++ for all editing for websites.
 
I'll have a look at that notepad++ as a few people have suggested it.

Cheers

Andy
 
And for future reference, if you aren't using a two-button mouse or a later mac that supports two-finger tapping then to bring the context menu up you use Ctrl+Click

From what you posted it looks like the tags were either improperly formatted or that you were saving as a .txt/.rtf file.

If you are editing text files on your mac I always use TextMate but there are hundreds of other (free) text editors that do the same job (such as http://tuppis.com/smultron/)
 
i have a 2 button mouse and the file was saved as a HTML file as stated and shown above. I don't know about the formatting of the tags as i copied the code from a running website!?!?!?!?

I give up, too much hassle. KompoZer is ok for a freebie so i'll use that.
 
Back
Top