I have a document written in html code and saved in notepad . I try to save it as an html document but it only offers me option of saving it as a .txt file or “all files.” So how do I see what this file looks like when read by a browser?
Just type the full name into the box e.g. filename.html
Then click on the file where you saved it and it should open in your default browser.
Alternatively, save it as a .txt file, close it in notepad, then rename it to have a .html ending.
A double click should then open it in your browser and a right click should give you the option of editing it in notepad.
Rubble’s way is better, though.
the answer from Pullo in Germany worked for me , the answer from Rubble in England did not work for me. But thank you from me in California.
To save it with a filename that doesn’t end in .txt you have to select “all files” in the drop down.
If the filename needs to contain spaces or other characters that notepad does not normally accept then you can wrap the entire filename in quotes.
As far as saving the file in html is just simple name as filename.html and press enter. Renaming it after making it as txt also work but i think not advisable.
but as the OP pointed out - saving it with .html when the type is still set to text results in .html.txt on the end instead of .html - you need to change type to all files to avoid having the .txt added
Yeah you right it works with other documents like renaming the extension and got the warning message “changing the extension would result in corruption of file”.
IT may not give warning when the extension is not changed rather it append in the filename end as you said.
It is good there is a warning to be of help for those that don’t know what they’re doing.
Changing extensions from Binary <-> Text could very well corrupt a file
And I suppose there is a possibility of BOM issues.
But I have not had any problems creating PHP, javascript, HTML, CSS etc. files initially as “.txt” files and then changing the extension when done.
The easiest way, and the way I recommend, is to use Microsoft Word version 7.0 and use the “save as” option. When in the " save as " screen, click on the “save as type” box. A list will then appear below it. From that list choose “HTML document (.html,.htm,*.htx)” This way Word will save your file as a HTML document. I hope this will help you!
<snip>
I’m pretty sure that saves the document into HTML format so that it displays as you see on the screen, rather than allowing you to save the raw code, so that’s not a good idea!
Rule one for writing HTML - never use a word processing program such as Microsoft Word - what Word calls HTML is a proprietary code used for transferring word documents to earlier versions of Word - it has nothing to do with the HTML used on the web.