I use this syntax
get_html_file(FileOrStream, P) :-
dtd(html, DTD),
load_structure(FileOrStream, [P],
[ dtd(DTD),
dialect(sgml),
shorttag(false),
syntax_errors(quiet),
max_errors(-1)
]).
the option syntax_errors(quiet)
should do.
I recall I had some hard time parsing old pages with errors. Error handling can be complicated, some tool like tags soup, being more tolerant, could help in getting the work sone...