1
<html>
 <head>
  <title>
    Java Script file
  </title>
  <script>
    alert("Hacked file!")
    document.write("Hello world!");
  </script>
 </head>
 <body></body>
</html>

Notepad++ could not format this code how i apply source formatting.

Faizan Naeem
  • 11
  • 1
  • 3
  • http://stackoverflow.com/questions/7117949/how-to-auto-format-indent-xml-html-in-notepad – RamPrakash Apr 07 '17 at 12:46
  • 2
    Possible duplicate of [How To Auto-Format / Indent XML/HTML in Notepad++](http://stackoverflow.com/questions/7117949/how-to-auto-format-indent-xml-html-in-notepad) – Greg Eremeev Apr 07 '17 at 13:08

3 Answers3

0

Select all html and...

TextFX -> HTML Tidy -> Tidy: Reindent XML

You may need to install the TextFX plugin if you do not have it already. https://sourceforge.net/projects/npp-plugins/files/TextFX/ or more easily:

Plugins > Plugin manager > TextFX > Install

mayersdesign
  • 5,062
  • 4
  • 35
  • 47
0

You need to install the XML tool from the Plugins --> Plugin Manager --> show Plugin Manager and then check the XML tools, install it and then Ctl+Alt+Shift+B OR the option for XML Tool above shows up.

Source

Community
  • 1
  • 1
Kamikaze
  • 23
  • 1
  • 8
-2

go for visual studio.it will let you format it. in fact it will allow you to write,compile,edit any code of almost any programming language.

Harsh
  • 23
  • 5