Where does the doctype tag; <!doctype html>, go?

At the top of the webpageBetween the body tagsBetween the head tags

<!doctype html> goes at the top of the webpage.