I spend a lot time scanning HTML code to ensure that I have coded both opening and closing elements for paired tags. It’s easy to do when tag elements are on the same line or within a line or two, but sometimes I write a <div class="selector">
that’s followed by many lines of nested divs or other tags before the </div>
element. It’s difficult to find omissions or multiple closing elements when many lines separate opening and closing tags for nested statements.
Perhaps this is due to bad coding practices on my part, but I don’t understand why VS Code (or whatever editor) can’t keep up with the syntax and note whether paired tags are complete. If this is somehting that VS Code can do, I haven’t figured out how to do it yet.
I frequently see feedback when coding CSS if I’ve failed to close an element identifier with a colon or fail to put a semi-colon on the end of a statement. If it can track this syntax, why can’t it track HTML paired tags?
I’ve searched and have not found any article addressing this question.