Simple HTML document model. Copied from the Grinder project