I just learned that there are two types of HTML elements: Block elements and inline elements. Please see the definition here.
It appears to me there must be a third kind of HTML elements that are used outside of
I could not find a good, free solution for this. I ended writing my own set of polymorphic classes for HTML DOM building and HTML5 generation. Works fine but it is not realistic to support entire HTML5. Instead I implement new features if required.