Edit: to expand a bit, the link is to a pretty readable/hyperlinked DTD grammar for HTML (W3C HTML 5.1)