how to preview the html file
-
There’s a plugin called Preview HTML, which should do what you want – it creates a new panel in Notepad++ that will show a rendered view of the current HTML document. (Note that the preview window is not a full web browser; don’t expect javascript to run, and don’t expect to be able to browse/navigate your whole website through the preview window; it’s just the current document). When you make a change and save the HTML file, you can hit refresh on that preview window.
Alternately, you can just use Notepad++'s built-in View > View Current File in … submenu, and choose to load your HTML file in Chrome, Edge, Firefox, or (shudder) IE. This will just tell your chosen browser to use the file://… URL to the file you are editing. When you make a change and save the HTML file in Notepad++, you can then use your browser’s refresh to refresh it.
-
There’s also the tab context menu option to
Open in Default Viewer
for folks that don’t use any of the pre-configured browsers. -
@PeterJones Thank you! Thank you! Thank you!
-
I’ve followed the View > View Current file in steps method but it only opens the raw code, not the formatted type of stuff I have if I open it from the regular notepad app, so I know it’s not a problem with my code. (If it is a problem with my code, it’s because I didn’t format it to Notepad++ or something like that) Does anyone have any idea how to solve this problem?
-
@Coolcreep-1465 said in how to preview the html file:
View > View Current file in steps method but it only opens the raw code,
My guess is that you didn’t name your file
blah.html
(orblah.asp
orblah.php
or whatever other web format you are using), so the browser treats it as plain text.But also remember that view current file in opens the source in the browser; there is no server… so if you expect the server to run some code to generate your HTML, that’s not going to happen.
-
@PeterJones thanks, I’m only barley starting to learn this stuff, so any help is much appreciated. sorry if I asked a pointless question in your eyes.
-
This post is deleted! -
Also note that for this to work you have to have an actual file – no folks, something like
new 4
, even if you’ve set its Language to html, isn’t going to cut it. Hit the actual Save on it, give it a real name (ending in e.g. .html) on your disk.Rue the day when Don introduced this “new X” concept (and making it worse: with auto-remembering these “files” over runs of N++). What seemed like a good idea in 2003…hmmm.
-
This post is deleted! -
This post is deleted!