The DTD you choose will depend on your choice of document type. I'll show you how to declare them shortly. But before that, I want to turn to the issue of root element and namespace. Element and attribute names must be in lower case. All attribute values must be quoted.
Nonempty elements require end tags.
Empty elements require either an end tag or a termination. Let's take a detailed look at what each of these considerations entail. However, many HTML coders have learned HTML in boot-strap fashion by necessity, or simply don't know or care much about meticulous code. Those people face the hard reality of having to clean up their proverbial acts. A well-formed document contains clean, consistent markup written to the rules and regulations of the language.