Would like "Error" on missing tag

For technical support and bug reports for all editions of CSS HTML Validator, including htmlval for Linux and Mac.
Post Reply
PJBeee
Rank 0 - Newcomer
Posts: 6
Joined: Tue Oct 13, 2015 11:47 am

Would like "Error" on missing tag

Post by PJBeee »

How do I make a missing tag e.g. "</p>" show up as an error (under the Error tab) when validating?

Right now I need to check the structure tab for tag counts, and then check the content for the missing tag.

Thanks!

(BTW I emailed this question but then realized I should have posted it here)
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Would like "Error" on missing tag

Post by Albert Wiersch »

Hi Paul,

If you want to require all optional end tags then you can check the relevant option in the 'Validator Engine Options->Validator Engine->Tag Options' page.

I hope this helps. Please let me know if you have any more questions.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
PJBeee
Rank 0 - Newcomer
Posts: 6
Joined: Tue Oct 13, 2015 11:47 am

Re: Would like "Error" on missing tag

Post by PJBeee »

Yes. I checked that box, but (for instance) if there's a missing </p> tag, I still don't know where it is in my document; it would be helpful if, under the "structure" tab, if I see " p 24 24 23" I can have an idea of which start <p> tag (line #) has a missing end tag.

Again, thanks for a great tool!
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Would like "Error" on missing tag

Post by Albert Wiersch »

Hi Paul,

If you check that option then typically CSE HTML Validator should generate a couple of new error messages like this:
The "p" element must have an end tag (</p>) but the end tag was not found, is misplaced, or was not seen due to other errors.

And this:
The end tag for "p" (started in line 11, column 2) should appear before the end tag for "body" or this end tag should be deleted or moved. This is a nesting error.

If you click on those messages then it should take you to the relevant place in the document and you should be able to easily determine where the missing end tag should go.

In the structure view, you can look for "</p> (i)". The "(i)" means it was an implied end tag, so the end tag should be placed around there. If you click on the next tag in the structure view after the "(i)" end tag then it will likely take you to the general area where the end tag should go.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
PJBeee
Rank 0 - Newcomer
Posts: 6
Joined: Tue Oct 13, 2015 11:47 am

Re: Would like "Error" on missing tag

Post by PJBeee »

Sorry to say, I'm not seeing the error at all after checking that box (nothing showing in the Error tab), saving the settings, and even re-starting the Validator program.

And in the Structure view, it's difficult to scan the window for (i) tags. There should perhaps be a list of line numbers where the error(s) are.
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Would like "Error" on missing tag

Post by Albert Wiersch »

Hello,

Strange.

Can you email me a small sample document where you are not getting the expected errors so I can try it here?
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Post Reply