I'm using a new(to me) XP maching to write a program. I key in the below code in Notepad but when I save it to .html and then go to my documents I don't get the program but I just get the code?
In a plain text program -- such as Notepad -- you can create HTML and CSS files (which are text). But you save the doc with an __.html or ___.htm file extension (MIME type), instead of the Notepad deafult __.txt file extension. Then drag that HTML file icon over a browser icon or open it in a browser (which reads files ending in ___.html or __.htm).
Do NOT use a program such as Microsoft Word because it puts non-HTML coding into doc.
I'm assuming you're talking about when you open the site with your browser like Mozilla Firefox or Internet Explorer?
You're problem may be the way you are saving it. When you save it as .html makes sure it is not "Unitled 1.html.txt or something like that. This can happen, especially if you have known file extensions turned off on your computer.
For windows 7, you can fix this by going to Control Panel, Folder Options, in the popup window hit the View tab, and uncheck where it says "Hide File extensions for known types". Then go ack to your documents folder and see what the file extension actually is, if it differs from .html, manually type in and change it to it and it should work if this was the problem.
When you press save in notepad you must change the Save as type from a .txt document to a All Files type in the drop down menu at the bottom.
If your looking for a free program for creating websites, you can try HTML-KIT or use "textpad" it is similar to notepad but automatically saves in all files format and has color highlighting to make programming easier to see.
Dreamweaver is really the best tool for web masters!
Only if someone gives you a copy. The free alternatives work just as well when you write the HTML yourself instead of letting the program generate garbage for you that browsers then try to interpret as HTML.
Admittedly Dreamweaver does allow you to switch views to see what the finished page generated from your HTML should look like but its just as easy to open a web browser to achieve the same for other editors that don't have that option with the added advantage that you are then looking at the page the same way your visitors will.
The good thing about DW is that anyone from a novice to a seasoned veteran can use it and still do pretty well creating a webpage/site.
Novices tend to use design view and wizards strictly, therefore will get the bloated code syndrome ppl speak of. More experienced coders will in fact code in code view without all the wizards, and in so doing will tend to create more professional semantic webpages.
I like DW because it combines MANY features in one package, that very few other editors do combined.
But that has nothing to do with the OP's question.
Are you sure when you save the document in notepad, your giving it a title and then in the dropdown below the filename, you select All files. Then name the file......such as index.html.
This will save the document as an .html extension. Then if you double click the file, I like to save it to desktop initially to test it, it should open in a browser. If it doesn't, try right clicking on the file and select the program with which to open it. IE in your case.
I'm using a new(to me) XP maching to write a program. I key in the below code in Notepad but when I save it to .html and then go to my documents I don't get the program but I just get the code?
Code:
<html><body>what?</body></html>
Although it's important to know how to write HTML code, as a few others stated, I recommend Dreamweaver too. I can code 10 sites by the time you finish coding 1 site if you wrote it all in Notepad.
Most sites I develop, I have to do some manual coding of HTML & CSS, but the bulk of the code is done by Dreamweaver and saves many many hours of coding.
How much do you get for shoving Dreamweaver down my throat?
This site is for selling web development programs, not helping people, to write their own.
Big deal, save an .html file, plus twenty ads. You don't answer real questions.
I posted and no responses for a week except to insult me and call me an idiot. There was nothing to sell in my thread. I could have spent the week at the library or finding real help, i wasted my time here.
if you are using plain ole' notepad, thats perfectly ok. You just need to ensure you follow TEEDOFF's instructions because notepad will save the file in the wrong text format for an html file if you do not.
that being said, you may want to look at using Notepad++. It's fairly simple to use and helps you identify common beginner mistakes by using sysntax highlighting.
How much do you get for shoving Dreamweaver down my throat?
This site is for selling web development programs, not helping people, to write their own.
Big deal, save an .html file, plus twenty ads. You don't answer real questions.
I posted and no responses for a week except to insult me and call me an idiot. There was nothing to sell in my thread. I could have spent the week at the library or finding real help, i wasted my time here.