Indent HTML code in Notepad++

Asked

Viewed 12,289 times

1

How do you indent HTML code in Notepad++? I’ve saved the file as .html and indentation is not being automatic. Each enter, instead of adding a space (tab), it is going down a line as if it were a normal text. Is there a shortcut that I can indent all existing code and make the indentation to be done?

  • Use the sublime text, there is a specific extension to identar your code.

  • I want to continue with Notepad++. Thank you for the suggestion.

4 answers

7

You can use the XML Tools.

  • Install XML Tools from Plugin Manager.
  • Use the shortcut Ctrl+Alt+Shift+B (or Menu -> Plugins -> XML Tools -> Pretty Print)

2

Hello to indent in Notepad++ I use the shift+tab keys by selecting a snippet or the complete code with the Ctrl+A keys. I hope I’ve helped.

-2

There are several sites that provide this service for free, I use this one:

https://www.freeformatter.com/html-formatter.html

Copy your code and paste there, ask to format, then copy back to your editor... and that’s it, it’s very intuitive, easy to use and you don’t need to install anything.

-2

Install the Ident By Fold plugin. Then just go in plugin, Ident by fold, ident file.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.