I know that different doctypes are essentially about how compliant the html is, but what difference does it make what doctype you specify? Do browsers handle the same code d
Because Doctype is the flag to tell how the browser should handle the page.
For example :
HTML5 need this doctype If you remove this from the page, the any HTML5 capabilities inside your page won't be activated.
You can read more in http://www.w3.org/QA/Tips/Doctype