Can HTML validator exclude certain checking?

Post here if your topic is about CSS HTML Validator but doesn't fit in another forum.
Chris13
Rank 0 - Newcomer
Posts: 1
Joined: Fri Mar 18, 2005 4:37 pm

Can HTML validator exclude certain checking?

Post by Chris13 »

We have need for a validator that checks only tags such as <ul> <b> <br> <li> and basic <table> tags. Our biggest problem is table tags that arent closed.

Writing our own rules would be cool which looks like you have.

However, we dont validate entire pages, we need to validate a block of text that is programmatically inserted into a page... So there will never be a HEAD or BODY tag, etc.

Can your application do this from a batch file?

Chris
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: Can HTML validator exclude certain checking?

Post by Albert Wiersch »

Chris13 wrote:However, we dont validate entire pages, we need to validate a block of text that is programmatically inserted into a page... So there will never be a HEAD or BODY tag, etc. Can your application do this from a batch file?
Yes! If you validate a block of HTML, then CSE will assume it is in the proper section... so if you validate a chunk of HTML and the first tag is "table", then it checks it assuming it is a chunk that belongs in a "body" section, so it won't generate errors for not having "body" tags.

For example, it would generate this message when checking a block of HTML that is a table and starts with a "table" tag:
The first tag in the document was out of range. The document has been checked with the assumption that a block of HTML that belongs in a <html><body> ... </body></html> section is being validated.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial