User Submitted Macro

HTML Match Tags

Written by Matthew S. Reinsmith

What it does

This Macro allows you to choose a file containing HTML tags, specify a tag name, and it will return a csv file displaying the “Matched Tag” structure of that tag. This allows you to quickly pick out a problem in a complex HTML, JS, or CSS file.

To install

Download the macro file umhtmlmatchtags.mex and save it to your hard drive. Open this macro file or import the macro into your existing macro file by clicking File, Import, Import Macros.

To use

Simply run the macro and it will prompt you to browse for a file. Once you have select the file it will prompt you for a tag name. Enter the tag without any markup; i.e. for the <div></div> tag set, simply enter “div”. A results file will be generated in the same directory as the file you chose. This file will have the same name as your chosen file, except it will have “.csv” appended to it; i.e. the results for the file named index.html would be “index.html.csv”.

The results file will contain a tabbed tree structure of the tag levels (especially helpful for nesting, but helpful for any tag matching) and includes a summary of the Opened, Closed, and Unmatched counts at the end of the file.