Skip to content

Notepad++

How can I get a closing tag auto completed?

When I’m using tags I want to know how to get Notepad++ to close my HTML tags for me. For example, when I use <h1>Help Information< I would like the < to auto complete to the appropriate </h1> closing tag.

How can I do this? Or better, how can I get <h1> to automatically create the closing </h1> tag such as <h1></h1> and then I just type my headline between the two?

Settings > Preferences > Auto-Completion > Auto-Insert

Go to the above settings and select html/xml close tag. As soon as you finish typing a tag (e.g. <h1>) it will insert the closing tag.

Please note, you need to save a new file to *.htm extension before writing. This is the way to get the language setting HTML automatically.

The preferences dialog