Is there any way to stop Notepad++ from closing all html tags? For instance, link, meta, and img tags don't need closing. I'm not the fastest in the world, and definitely don't want to complain about free software, but having to remove unneeded closed tags is slowing me down.


Take a look: https://stackoverflow.com/questions/20373962/auto-close-of-html-tags-and-php-tags-in-notepad-and-a-semicolon-at-the-end-of

Changing the auto-complete preferences, as below, worked:

enter image description here

Auto-Completion tab > Auto-Insert section > html/xml close tag

enter image description here

  • Thanks @duDE. But this closes (or not) all html tags. I would like to target only those few that don't need closed, such as link and meta tags. – brezz Feb 5 '15 at 16:56

As far as I know, the tag has to be closed even if it is a self-closing tag. There is a shorthand method for this:

<link rel= "stylesheet" href= "css/style.css" />

By adding a space + / will prevent Notepad from adding a closing tag.


I am late, but plugin TextFX closes only those elements that need to be closed and leaves blank elements like hr, img, etc. without closing tag. You should find it in notepad++ upper menu. Plugins -> Plugin Manager -> Show Plugin Manager and there find "TextFX Characters" or something like that.

Once you've got it installed, go to TextFX -> TextFX Settings and there Autoclose XHTML/XML .

Hope I helped.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.