What does the
doctype do in HTML code?
For example, this line of code is in a lot of HTML code I see:
What is the purpose of that?
It tells the browser what version of HTML the page is written in. This ensures your HTML is parsed the same way by each different browser.
Read more information here: https://html.spec.whatwg.org/multipage/syntax.html#the-doctype.