• Login
Community
  • Login

Running an HTML in Notepad++

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
10 Posts 4 Posters 120.2k 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.
  • P
    Phoebe Jeebie
    last edited by Mar 22, 2019, 9:54 AM

    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.

    M 1 Reply Last reply Mar 22, 2019, 10:08 AM Reply Quote 0
    • M
      Meta Chuh moderator @Phoebe Jeebie
      last edited by Meta Chuh Mar 22, 2019, 10:19 AM Mar 22, 2019, 10:08 AM

      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>
      
      A 1 Reply Last reply Mar 22, 2019, 12:22 PM Reply Quote 0
      • A
        Alan Kilborn @Meta Chuh
        last edited by Mar 22, 2019, 12:22 PM

        @Phoebe-Jeebie said:

        from notepad++

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

        M 1 Reply Last reply Mar 22, 2019, 1:30 PM Reply Quote 0
        • A
          andrecool-68
          last edited by Mar 22, 2019, 12:44 PM

          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>
          
          A 1 Reply Last reply Mar 22, 2019, 1:22 PM Reply Quote 2
          • A
            andrecool-68
            last edited by Mar 22, 2019, 1:07 PM

            Second option, right click on the file tab:

            1 Reply Last reply Reply Quote 1
            • A
              andrecool-68
              last edited by Mar 22, 2019, 1:12 PM

              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
              • A
                andrecool-68 @andrecool-68
                last edited by Mar 22, 2019, 1:22 PM

                @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
                • M
                  Meta Chuh moderator @Alan Kilborn
                  last edited by Meta Chuh Mar 22, 2019, 1:31 PM Mar 22, 2019, 1:30 PM

                  @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
                  • P
                    Phoebe Jeebie
                    last edited by Mar 23, 2019, 1:45 AM

                    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.

                    A 1 Reply Last reply Mar 23, 2019, 8:22 AM Reply Quote 1
                    • A
                      andrecool-68 @Phoebe Jeebie
                      last edited by Mar 23, 2019, 8:22 AM

                      @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
                      5 out of 10
                      • First post
                        5/10
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors