<!doctype html> <html lang='en'> <head> <meta charset='utf-8'> <title>Minimum HTML5 Document</title>
<!DOCTYPE html> <html xmlns='http://www.w3.org/1999/xhtml' lang='en'> <head> <meta charset="utf=8"/> <title>Minimum xhtml5 Document</title> </head> <body> </body> </html>
<!DOCTYPE html> <html xmlns='http://www.w3.org/1999/xhtml' lang='en' xml:lang='en'> <head> <meta charset="utf=8"/> <title>Minimum Polyglot HTML5 Document</title> </head> <body> </body> </html>
Doctype may be either upper or lower case for html; it must be ALL CAPS for xhtml or polyglot.
Specified language (en) and charset (utf-8) is for example purposes; use whatever is appropriate for your situation.
HTML is very tolerant of sloppy markup. XHTML requires closing tags. Refer the DTD to see which tags can be self-closing and which cannot. An example of a self closing tag is <img/>. Compare that to an element that requires a closing tag, <p></p>.
Modern browsers are very tolerant of noncompliant markup. If you're feeling lazy you could create a web page containing only your markup and save it with the extension .html and it would probably display correctly.