Create your first website doesn't work
Page 1 of 1
Create your first website doesn't work
I am an absolute newbee to coding so please forgive me for a really basic question.I have just finished Lesson 4. I am sure I have followed the lesson to the letter, saving my text file from TextEdit on my Mac as a .html file.
However, when I open it in a browser, it just looks the same as it does in TextEdit. I am sure I am doing something quite fundamentally wrong. The code I have saved ispasted below. Can anyone see what I have done wrong?
<html>
<head>
<title>My First Website</title>
</head>
<body>
<p>Hurrah! This is my website</p>
</body>
</html>
Re: Create your first website doesn't work
Sensational!!! Thank you CubeSquare, this has worked a treat!Bring on Lesson 6!
;-)
Re: Create your first website doesn't work
Thanks newbee for asking and Thanks cubesquare for answering. I an new as well and have a macbook and I don't have luck.I did what the Dave website suggested but I am still looking the element and content and tags instead of the actual web page.
When I double click to open page1.htm, it gives me the source code with <html> ... </html> when "Ignore rich text commands in HTML files" is unchecked. When I checked this box, quit textedit and reopened my page1.htm, I got a even more complicated source code with more coding lines like this:
<!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="1038.36">
<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}
span.Apple-tab-span {white-space:pre}
</style>
</head>
<body>
<p class="p1"><span class="Apple-converted-space"> </span><html></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-converted-space"> </span><head></p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-converted-space"> </span><title>My first website </title></p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-converted-space"> </span></head></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-converted-space"> </span><body></p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-converted-space"> </span><p>Hurrah! This is my website.</p></p>
<p class="p1"><span class="Apple-tab-span"> </span><span class="Apple-converted-space"> </span></body></p>
<p class="p2"><br></p>
<p class="p1"><span class="Apple-converted-space"> </span></html></p>
</body>
</html>
Help, what I am doing wrong?
Regards;
pmlearn
Re: Create your first website doesn't work
This is not good because the program wants to work with Rich Text Format, not plain text (the ruler is the giveaway). To fix that, go to Format --> Make Plain TextNow, almost done (and you only have to go through this once: once the file is properly named, TextEdit will remember for future edit sessions). Choose File --> Save As... and type in a filename that includes a ".html" filename extension.
Yes, it's a bit of a pain, but, as I said, you only have to do this once, when you first save the file, and from then on, it'll work transparently.
Re: Create your first website doesn't work
Thank You so much. It works this time. I like this site and I am learning. Very much appreciate the support.Re: Create your first website doesn't work
My Pleasure....Page 1 of 1