We do not look at the attributes of the tags as of now for correctness. But we try to make sure that the tags themselves are in the correct location, syntactically.
The code depends on a table, which can be over-ridden by the user.
There is a default, incomplete, HTML-table.
The tree generating code can use the supplied/inbuilt table, and
hence we are guaranteed a "good" tree because of this.
The aimed extensions include calls to user-defined functions to check
the validity of the attributes of the various tags.
For actual code, look at the main page for announcements.