Knowledge Dump

HTML Checker

This application can be used to detect errors in HTML tags. It takes the HTML code as input and highlights tags in the following cases:

Text inside comments, as well as php directives enclosed in <? ?> tags are ignored. The same goes for tag attributes.
The app functions are written in C++17 and the user interface was built with Qt (Qt version 5.13.0, MinGW 7.3.0). It was made for personal use, so there's lots of room for improvement in terms of app efficiency.

Download(zip) contains the program and source code. The executable is made for Windows OS – more versions could be easily created for other platforms, using the source files. Since the application was built as a standalone file using a static version of Qt, it can be used without any setup and doesn't require any .dll files. However, this also led to the file size being bigger than expected for such a small application (17MB).


Code files




How to use: (Example)

Simply paste some HTML code into the text box and push the "Check Input" button. If errors are encountered, the "Jump to Error" button can be used to locate them.
Upon checking the input box, some parts of the content will be color coded. Comments appear grayed out, while php tags are highlighted as blue. If a tag is unknown to the program, it will be magenta colored, while any other error is marked red.

Example 1


The "Settings" tab can be used to configure the tag list and is mostly self-explanatory. To save changes for later use, the tag lists can be exported to a .txt file. They can either be loaded manually, or automatically on startup, if they are placed in the same directory and named "default.txt". Note that the "Reset to Default" button only changes the list back to its startup state, i.e. the default.txt is reloaded if present – if the lists shall be changed back to their original states, the default.txt file has to be either (re-)moved, or renamed.

Example 2