[tex4ht] validity of tex4ht HTML-code output

William F Hammond hammond at csc.albany.edu
Thu Jul 28 19:23:54 CEST 2011

Johannes Wilm <mail at johanneswilm.org> writes:

> The W3C tells me there are around 3000+ errors in it, even though it
> can see the declaration.

Are the 3000 errors for HTML 4.01 or for XHTML?

Generally one wants to work through such an error list one line at
a time beginning at the top.  Fixing an early error will sometimes
eliminate many following errors.

That aside, my experience is that tex4ht makes valid output when
the input markup is confined to correct use of supported commands.

> Does HTML 4.01 allow for one making up one's own tags and
> attributes? Like tspan and font-weight (not as css, but as an
> attribute of tspan)?


> Do P-tags not have to be closed?

Not in HTML 4.01 unless there is a special circumstance.

> At any rate, tidy manages to clean all this up for me. I am happy.

Unless I'm missing something, I doubt if you need "tidy" when tex4ht
is used correctly.

                                    -- Bill

More information about the tex4ht mailing list