Community
    • Login

    How to run html code in browser

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    8 Posts 4 Posters 2.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Lehlogonolo FrankL
      Lehlogonolo Frank
      last edited by

      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.

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Lehlogonolo Frank
        last edited by

        @Lehlogonolo-Frank

        Perhaps this or this applies to your situation.

        1 Reply Last reply Reply Quote 0
        • Michael VincentM
          Michael Vincent
          last edited by

          From the “Run” menu, “Launch in IE” or maybe the Preview HTML plugin?

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Alan KilbornA
            Alan Kilborn @Michael Vincent
            last edited by

            @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.

            1 Reply Last reply Reply Quote 2
            • Michael VincentM
              Michael Vincent
              last edited by

              @Alan-Kilborn

              Thanks - I still have the macros in my Run menu. Still not used to the new View menu option.

              1 Reply Last reply Reply Quote 1
              • PeterJonesP
                PeterJones
                last edited by

                @Lehlogonolo-Frank,

                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.

                1 Reply Last reply Reply Quote 2
                • Lehlogonolo FrankL
                  Lehlogonolo Frank
                  last edited by

                  Thanks a lot. Your response was helpful.

                  1 Reply Last reply Reply Quote 2
                  • Lehlogonolo FrankL
                    Lehlogonolo Frank
                    last edited by

                    Thank you all. Your suggestion were helpful.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors