Use the XML Tools plugin for Notepad++ and then you can Auto-Indent the code with Ctrl+Alt+Shift+B .For the more point-and-click inclined, you could also go to Plugins --> XML Tools --> Pretty Print.
The answers on this question are not only wrong, but dangerous.
CTRL+ALT+SHIFT+B will not indent HTML but XML. Consider the following HTML code:
<span class="myClass"></span>
The function 'Notepad++ -> Plugins -> XmlTools -> Pretty print (Xml only with line breaks)' (CTRL+ALT+SHIFT+B) will transform this to:
<span class="myClass"/>
which will not be displayed correctly anymore by your browser! I strongly advice against using this function to indent HTML.
Instead use the plugin Tidy2. This will indent the HTML correctly without bad side-effects (but it will also create <html>, <head>, <body>, ... elements around your code, if these are not there).
Just you need to install a plugin named Indent By Fold.
You can install this by going through Plugins -> Plugin Manager -> Show Plugin Manager. OR
Plugins -> Plugins Admin -> chekmark Indent By Fold from list than install
Then just select the list item and all you need is to type the first word then you got it.
you can use this plugin from a plugin in the menu bar.
Plugin Manager isn't strictly necessary for plugin usage. It does make things much easier, though.
Plugin Manager was eliminated from the core package apparently because the developer didn't like some included attribution linking.
You may notice that Plugin Manager plugin has been removed from the
official distribution. The reason is Plugin Manager contains the
advertising in its dialog. I hate Ads in applications, and I ensure
you that there was no, and there will never be Ads in Notepad++.
It's a manual install, but it's not difficult.
Download the UNI (32-bit) zip package and extract it. Inside you'll see folders called plugins and updater. Each contains one file.
Drag those two files to the respective identically-named folders in your Notepad++ installation directory. Typically that's C:\Program Files (x86)\Notepad++.
Restart Notepad++ and follow any install/update prompts.
Now you'll see a new entry under Plugins for Plugin Manager.