Macworld Australia

Macworld Forums: HTML on Textedit - Macworld Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

HTML on Textedit

#1 User is offline   AppleFan'08 

  • Mentor
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 03-April 10
  • Gender:Male
  • Location:Sydney

Posted 22 April 2010 - 04:14 PM

hey guys,

i got a project from school to design a web site using HTML codes on snow Leopard. Now i know to use Textedit, but when i type it up and save as a HTML like this

<HTML>
<body>
TEST TEST TEST
</HTML>
</body>

and open it in safari or firefox it doesn't read the codes, but if i try on Windows with Notepad using the same test as above and save as HTML and open in internet explorer, it will read it!

is there anything i'm doing wrong on the MAC??

thanks
2008 iMac Intel Core 2 Duo 2.66 GHz 2GB RAM | iPad 2 3G - WIFI 32GB Black | iPhone 4 16GB
0

#2 User is offline   Xavier Verhoeven 

  • Power mentor
  • PipPipPip
  • Group: Members
  • Posts: 521
  • Joined: 15-March 10
  • Gender:Male

Posted 22 April 2010 - 04:43 PM

If you change it to a text-only document (rather than rich text) in TextEdit (Format -> Make Plain Text), then save it as .html rather than txt, it should be right.
0

#3 User is offline   AppleFan'08 

  • Mentor
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 03-April 10
  • Gender:Male
  • Location:Sydney

Posted 22 April 2010 - 04:58 PM

i did, i type up the codes then save as, changed from rich text to .html and it didn't read it.
2008 iMac Intel Core 2 Duo 2.66 GHz 2GB RAM | iPad 2 3G - WIFI 32GB Black | iPhone 4 16GB
0

#4 User is offline   Xavier Verhoeven 

  • Power mentor
  • PipPipPip
  • Group: Members
  • Posts: 521
  • Joined: 15-March 10
  • Gender:Male

Posted 22 April 2010 - 05:04 PM

I think if you change it to plain text (in the way I described), then try to save it, you only get options of plain text formats. Just go with the default, and manually call it .html...

That way it should work. It did for me just before.

What OS are you running? TextEdit might work differently if you're on something else (I'm on Snow Leopard). But I don't know why that would be the case.

0

#5 User is offline   AppleFan'08 

  • Mentor
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 03-April 10
  • Gender:Male
  • Location:Sydney

Posted 22 April 2010 - 06:11 PM

i can't manually change it, it's got a drop down box and i select html. i am currently running Snow Leopard 10.6.3

below i posted the pics and did the following steps

Attached File(s)

  • Attached File  1.tiff (31.53K)
    Number of downloads: 5
  • Attached File  2.tiff (67.14K)
    Number of downloads: 3
  • Attached File  3.tiff (92.8K)
    Number of downloads: 2

2008 iMac Intel Core 2 Duo 2.66 GHz 2GB RAM | iPad 2 3G - WIFI 32GB Black | iPhone 4 16GB
0

#6 User is offline   mickdevlin 

  • Power guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 7,910
  • Joined: 28-January 08
  • Gender:Not Telling

Posted 22 April 2010 - 07:34 PM

Well, I've just tried to do the following using TextEdit and it worked for me:

CODE
<html>
<head>
<title>This is a Test</title>
</head>
<body>
Some content here.
</body>
</html>

The code worked for me in Safari but I also ensured that I selected Format > Make Plain Text before I started to write anything. In addition, when saving the file, I replaced the extension "txt" with "html" in the Save dialogue sheet.

Two more points: the html tag shouldn't be capitalised and check and, if necessary, change the HTML options in TextEdit preferences.
Mick
0

#7 User is offline   AppleFan'08 

  • Mentor
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 03-April 10
  • Gender:Male
  • Location:Sydney

Posted 22 April 2010 - 07:48 PM

i copy and pasted the code and tried it with safari and firefox but the same thing happens, on my MAC laptop and iMAC both running 10.6.3

Attached File(s)

  • Attached File  4.tiff (89.22K)
    Number of downloads: 4

2008 iMac Intel Core 2 Duo 2.66 GHz 2GB RAM | iPad 2 3G - WIFI 32GB Black | iPhone 4 16GB
0

#8 User is offline   mickdevlin 

  • Power guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 7,910
  • Joined: 28-January 08
  • Gender:Not Telling

Posted 22 April 2010 - 08:09 PM

Download TextWrangler, which is a free (and real) text editor. If that doesn't work then you are doing something wrong.
Mick
0

#9 User is offline   AppleFan'08 

  • Mentor
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 03-April 10
  • Gender:Male
  • Location:Sydney

Posted 22 April 2010 - 09:15 PM

great thanks for that download but is there a option to save as a .html on it?
2008 iMac Intel Core 2 Duo 2.66 GHz 2GB RAM | iPad 2 3G - WIFI 32GB Black | iPhone 4 16GB
0

#10 User is offline   rachp 

  • Mentor
  • PipPip
  • Group: Members
  • Posts: 429
  • Joined: 12-February 08
  • Gender:Female
  • Location:Melbourne

Posted 23 April 2010 - 12:13 AM

This first code you posted has the ending tags in the wrong order. The </HTML> should be at the end. Perhaps that's why it didn't work.
0

#11 User is offline   aeroTreacle 

  • Group: Members
  • Posts: 14
  • Joined: 25-January 10

Posted 23 April 2010 - 04:29 AM

TextEdit has the faculty of both editing HTML (or RTF) code and displaying it the way a browser (or word processor) would. It is just that it is a simple program that does not show both versions at the same time, and does not have a slick and polished way of doing this.

It is controlled in Preferences.

For what you want… In Preferences, TextEdit has two sets of preferences — one for “New Document” and one for “Open and Save”. In the former, select “Plain text” instead of “Rich text”. (This makes it a text editor instead of a word processor.) In the latter, turn on “Ignore rich text commands in HTML files” to see what you typed, and turn ignoring off to see the browser version.

It does not change on the fly; you have to do the “New Document” thing before you create the file, and you have to do the “Open and Save” thing before you open a file. (If you have accidentally made your HTML code in rich text format, you can get it across to another file by copying, changing the Preference, making a new (text) file, and pasting.)

Tip: I tried making two instances of TextEdit.app, each with different preferences (one for text and one for RTF); as I recall, this worked.
0

#12 User is offline   mickdevlin 

  • Power guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 7,910
  • Joined: 28-January 08
  • Gender:Not Telling

Posted 23 April 2010 - 04:20 PM

QUOTE (AppleFan'08 @ Apr 22 2010, 09:15 PM) <{POST_SNAPBACK}>
great thanks for that download but is there a option to save as a .html on it?

Yes.
Mick
0

#13 User is offline   AppleFan'08 

  • Mentor
  • PipPip
  • Group: Members
  • Posts: 127
  • Joined: 03-April 10
  • Gender:Male
  • Location:Sydney

Posted 23 April 2010 - 10:47 PM

works great and it worked to complete my project, thanks for the download biggrin.gif biggrin.gif
2008 iMac Intel Core 2 Duo 2.66 GHz 2GB RAM | iPad 2 3G - WIFI 32GB Black | iPhone 4 16GB
0

#14 User is offline   avinmichal 

  • Group: Members
  • Posts: 5
  • Joined: 10-July 11

Posted 16 July 2011 - 02:46 AM

As my thinking point of view HTML is a hyper text markup language. it is use for develop a new website.Designing your website with a accepted attending acclimated to be difficult if application HTML tags.Using tags like and to ascendancy the appearance for a section of argument on every page is harder to advance if you accept added than a few pages of agreeable on your site. With CSS you specify chantry properties, size, color, borders etc in one CSS file. CSS files are just coded text, so you can adapt them in a basal editor such as Argument Adapt on Mac and Notepad on the PC.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users