Search code examples
htmlnotepad++

Show unmatched html tags in Notepad++


Is there a way to highlight unmatched HTML tags in Notepad++?

For instance, if I had the following HTML...

<HTML>
<!--Server: <%=(java.net.InetAddress.getLocalHost()).getHostName()%>-->
<HEAD>
   <TITLE>Vital Stats</TITLE>
   <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
   <SCRIPT SRC="vital_stats.js" TYPE="text/javascript"></SCRIPT>
   <LINK REL="STYLESHEET" HREF="../main.css">
</HTML>

I would like the <HEAD> tag to be highlighted in some way to indicate that it doesn't have a corresponding </HEAD> tag.

I would also like to see any closing tags highlighted that don't have a corresponding opening tag.

EDIT

I already know about Notepad++'s feature of clicking a tag to see it's corresponding tag. I'm looking to highlight ANY tags that aren't matched in the ENTIRE document. Even if there's some sort of utility/plugin that I could run that would list for me the line number and name of any unmatched tags would be helpful.


Solution

  • I've put in a request for someone to develop a plugin to do this in Notepad++ at https://sourceforge.net/projects/notepad-plus/forums/forum/331753/topic/4936812

    Until that happens, it appears that this cannot be done in Notepad++.