Question:
How to program with HTML?
adam
2018-07-13 20:29:21 UTC
I am just beginning learning how to program with HTML, using Notepad to write all my source code. I have saved the document with name “index.html”, and document type “All files”, but when I try to access it only the chrome webpage shows up and I can’t find the original Notepad document. I am using Windows 7 and browser Google Chrome. Any help would be massively appreciated.
Five answers:
delawaredreaming
2018-07-16 14:46:29 UTC
When you click it the default is Chrome on your computer. Open Notepad and then open document from within notepad. All the other answers will work too. I just wanted to point that you have Chrome set to the default for your html extension. By the way, "programming" in html is not programming logic. It's giving instructions on what to display in an html displayer whether it be a browser or an etch-a-sketch that has the logic to display html.
?
2018-07-14 17:20:08 UTC
You cannot program with HTML! Set your properties (association) for .html to open notepad, then it should solve your problem. If you do not know how to do this google file extension association



Best wishes
PoohBearPenguin
2018-07-14 00:24:06 UTC
HTML is not a programming language. It is a text formatting language, nothing more.



Anyways the easiest way to do this is simply open the file manager, locate the index.html file, and double click on it. It's probably in your Documents directory.



This will tell Windows to open the file with whatever application is linked for that type. For .html, it should be your default web browser.



Going forward, however you'll want to host your file on a webserver. You can get a small webserver for your computer for free, and simply copy the file into the proper directory, or, you can look into one of those free webhosting services, and upload your file there.
?
2018-07-13 23:49:25 UTC
You need to right click > edit with notepad. Just opening it opens it in it's default program which for html files is a browser.
husoski
2018-07-13 22:10:36 UTC
By "access it", do you mean "open it" by double-clicking an icon? If so, that's the normal way to open an HTML file. RIght click on the document's icon and choose "Open With>" to use Notepad to open it.



If Notepad isn't on the list, it's a bit messy to get it on there, but you only have to do this once:

1. Right-click on the icon, and hover on "Open with >" to get a menu, then click "Choose default program..."

2. IMPORTANT: Uncheck the "Always use selected program to open this kind of file." box.

3. If Notepad is on this list, double click it and you're done. If not, the click the "Browse..." button.

4. In the directory "address box" on type, type "%SystemRoot%\System32" and press Enter.

5. In the filename box, type "notepad.exe" and press Enter (or scroll down to "notepad" and double-click.)

6. Now Notepad should have an icon in the "Open with" dialog box. Double-click it and you're done.



After that, you'll just right-click, open-with and choose Notepad.



By the way, that "All Files" isn't an actual file type. It's just used in open and save dialogs to let you see all files of all types that are in the folder (directory) you are working with.



There's a small tweak that anyone doing programming on Windows ought to consider. By default, Windows hides the file type extension on the file names. I prefer seeing exactly what the file name is. To do that, click Start and in the search box type "Folder Options". You can also find this in Control Panel, but typing the name is usually easier. In the "Folder Options" dialog, click on the "View" tab, then uncheck the "Hide extensions for known file types" box, then click OK.



From now on, you'll see "project1.html" or "project1.css", etc. so you know exactly what you're looking at. One bit of caution, though. This makes it easier to change that filetype extension in a rename, which makes it harder (or impossible) to open the file properly until you rename it back. Windows 7 added some assistance by not highlighting the type in a rename operation, but you can use arrow keys to defeat that. Don't do that, except if you're fixing up a previous bad rename.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...