Community
    • Login

    Running an HTML in Notepad++

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    10 Posts 4 Posters 120.0k 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.
    • Phoebe JeebieP
      Phoebe Jeebie
      last edited by

      Im trying to run an HTML from notepad++ :

      <!DOCTYPE html>
      <html>
      <head>
      <style>
      body {background-color: powderblue;}
      h1 {color: blue;}
      p {color: red;}
      </style>
      </head>
      <body>

      <h1>This is a heading</h1>
      <p>This is a paragraph.</p>

      </body>
      </html>

      I’ve followed the instructions from my course outline.

      Shits not working.

      Plz. Send. Halp.

      Meta ChuhM 1 Reply Last reply Reply Quote 0
      • Meta ChuhM
        Meta Chuh moderator @Phoebe Jeebie
        last edited by Meta Chuh

        welcome to the notepad++ community, @Phoebe-Jeebie

        if you want to run your html code:

        • save your code as choose_a_name.html to your desktop.

        • right click on your choose_a_name.html file on your desktop and choose your favourite browser from the open with context menu, e.g. internet explorer, chrome, edge or any other web browser you have.

        your html code will now show up in your favourite web browser and the shit will work 😉

        ps: this was successfully tested with your code:

        <!DOCTYPE html>
        <html>
        	<head>
        		<style>
        			body {background-color: powderblue;}
        			h1 {color: blue;}
        			p {color: red;}
        		</style>
        	</head>
        	<body>
        
        		<h1>This is a heading</h1>
        		<p>This is a paragraph.</p>
        
        	</body>
        </html>
        
        Alan KilbornA 1 Reply Last reply Reply Quote 0
        • Alan KilbornA
          Alan Kilborn @Meta Chuh
          last edited by

          @Phoebe-Jeebie said:

          from notepad++

          @Meta-Chuh I’m surprised you (maybe) missed those 2 words

          Meta ChuhM 1 Reply Last reply Reply Quote 0
          • andrecool-68A
            andrecool-68
            last edited by

            Edit your file shortcuts.xml

            	<UserDefinedCommands>
            		<Command name="Open Language Folder..." Ctrl="no" Alt="no" Shift="no" Key="0">&quot;Explorer&quot; &quot;$(NPP_DIRECTORY)\autoCompletion\&quot;</Command>
            		<Command name="Open UDL Folder..." Ctrl="no" Alt="no" Shift="no" Key="0">&quot;Explorer&quot; &quot;$(NPP_DIRECTORY)\userDefineLangs\&quot;</Command>
            		<Command name="Launch in IE" Ctrl="no" Alt="no" Shift="no" Key="0">iexplore &quot;$(FULL_CURRENT_PATH)&quot;</Command>
            		<Command name="Launch in Chrome" Ctrl="no" Alt="no" Shift="no" Key="0">chrome &quot;$(FULL_CURRENT_PATH)&quot;</Command>
            		<Command name="Get PHP help" Ctrl="no" Alt="no" Shift="no" Key="0">http://www.php.net/$(CURRENT_WORD)</Command>
            		<Command name="Wikipedia Search" Ctrl="no" Alt="no" Shift="no" Key="0">https://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD)</Command>
            		<Command name="NppShell_add.vbs" Ctrl="no" Alt="no" Shift="no" Key="0">NppShell_add.vbs</Command>
            		<Command name="NppShell_dell.vbs" Ctrl="no" Alt="no" Shift="no" Key="0">NppShell_dell.vbs</Command>
            	</UserDefinedCommands>
            	<PluginCommands />
            	<ScintillaKeys />
            </NotepadPlus>
            
            andrecool-68A 1 Reply Last reply Reply Quote 2
            • andrecool-68A
              andrecool-68
              last edited by

              Second option, right click on the file tab:

              1 Reply Last reply Reply Quote 1
              • andrecool-68A
                andrecool-68
                last edited by

                The third option to view the file:
                Install …Preview HTML is a plug-in for Notepad++
                https://fossil.2of4.net/npp_preview/home

                1 Reply Last reply Reply Quote 2
                • andrecool-68A
                  andrecool-68 @andrecool-68
                  last edited by

                  @andrecool-68 said:

                  Edit your file shortcuts.xml

                  Select the browser to be launched in the Run menu

                  Imgur

                  1 Reply Last reply Reply Quote 0
                  • Meta ChuhM
                    Meta Chuh moderator @Alan Kilborn
                    last edited by Meta Chuh

                    @Alan-Kilborn

                    it’s yours to decide, whether i’ve missed out those two words, or i’ve ignored them, judging that we do not have the o.p.'s instruction from the course outline, nor any debug information to know where the o.p.'s shortcuts.xml is located … not to think about predicting, but not knowing the o.p.'s capabilities of finding and modifying notepad++ internal files.

                    sure, we could make a 100 post forward-backward reply topic about that, if you’d enjoy another one, but is it worth it ?

                    1 Reply Last reply Reply Quote 2
                    • Phoebe JeebieP
                      Phoebe Jeebie
                      last edited by

                      thanks guys, all fixed!
                      I just renamed the end of the file to ‘.html’
                      U_U
                      It was a stupid mistake. I’ve only been getting about 4hours sleep per night from starting my certificate.
                      Thank you for entertaining my basic need.

                      andrecool-68A 1 Reply Last reply Reply Quote 1
                      • andrecool-68A
                        andrecool-68 @Phoebe Jeebie
                        last edited by

                        @Phoebe-Jeebie said:

                        thanks guys, all fixed!
                        I just renamed the end of the file to *.html

                        You need to select the desired syntax, and then it will be automatically saved in the desired file extension.

                        Imgur

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