My HTML code changed when I added !DocType?

I wrote a html page for my university assignment but added DOCTYPE at the top, the layout looks diferent.

things look ugly and some disappeared. why did this happen and how can i fix this?
1 answer 1