更新时间:2022-10-15 16:16:37
As rlb.usa noted in the comments, most people rely on a mature, well-tested HTML renderer to display HTML. WebKit, Qt, and Microsoft's Trident control are popular choices depending on the platform.
If you've got a renderer that has problems with nonstandard code, you could run it through something like tidy first.