
Adam V. answered 04/26/16
Tutor
4.9
(19)
Professional Software Engineer, over 16 years work experience!
The first part of writing any program is breaking it down into parts.
It sounds like you need to do a few things here:
1. Read a file into memory
2. Parse the file using some rules
3. Write the errors to another file
Reading and writing files is pretty easy, there are numerous examples of how to do this online.
The bulk of the work is parsing the html file. You need to write the logic to "check if the tags are correct" and collect each error in a collection (like an list of strings). Then, when done parsing, if there are any errors, write them to the file.