How to run html code in browser
-
HTML code appears as it is inside the IE browser
It appers inside the browser including each every single syntax element; <h1> appears as <h1>
Please assit.
-
-
From the “Run” menu, “Launch in IE” or maybe the Preview HTML plugin?
-
@Michael-Vincent said:
From the “Run” menu, “Launch in IE”
There may be no such entry in the
Run
menu!The alternative may be
View
>View Current File in
>IE
But we really don’t know what exactly the OP is trying.
-
Thanks - I still have the macros in my Run menu. Still not used to the new View menu option.
-
It appers inside the browser including each every single syntax element; <h1> appears as <h1>
My guess is that you have not disabled Windows default setting to hide known extensions, so cannot see extensions, and thus doesn’t realize that the “HTML” document was saved as a
.txt
(or no extension, or …) rather than.html
. If the document does not end in.html
(or one of the html-like wrappers, like ASP or PHP), then IE or other browser has no way of knowing that you want the file interpreted as HTML, not plaintext; if you pass the browser a plaintext file, it will interpret it as plaintext.To help with getting the extensions right: in Windows Explorer view options, disable “hide extensions of know file types”, so you can always see the extension. In Notepad++, you may want to try toggling Preferences > Default Directory > ☐ Use new style dialog ; when enabled, you must explicitly type in the extension, so if you want it to be
page.html
, that’s exactly what you type; when disabled, if you select a Save As type, it will change the extension for you. Personally, I use the new-style, which forces me to be explicit and knowingly select the extension I want, but some people prefer for the dialog to set the extension for them. Either way, know which one you have, and understand when the onus is on you vs on the dialog box for setting the extension.And, regarding View Current File, as discussed here, and reported as issue#5903, if that’s the case, the
View > View Current File In > IE
will be greyed out. -
Thanks a lot. Your response was helpful.
-
Thank you all. Your suggestion were helpful.