By not defining the doctypeyou are "activating" the Quirks mode of the browser, here is a small explanation of its meaning on wikipedia :
... in standard mode pages are rendered according to the HTML and CSS specifications, while in "quirks" mode they try to emulate the behavior of old browsers to ensure that said pages are rendered according to the original intention of their authors .
The "User Agent Stylesheets" vary depending on the browser and are always added to your document. However, all of these styles are overridden by your own rules. Browser styles are, so to speak, the way the browser renders pages by default.
If you want to avoid this, one way is to do it using a CSS resetter. The most popular are Normalize and ResetCSS.
By not defining the
doctype
you are "activating" the Quirks mode of the browser, here is a small explanation of its meaning on wikipedia :In MDN you have a more detailed reference: https://developer.mozilla.org/es/docs/Quirks_Mode_and_Standards_Mode
The "User Agent Stylesheets" vary depending on the browser and are always added to your document. However, all of these styles are overridden by your own rules. Browser styles are, so to speak, the way the browser renders pages by default.
If you want to avoid this, one way is to do it using a CSS resetter. The most popular are Normalize and ResetCSS.