Note: I wrote this 2 years ago when I was obviously having some issues with some web pages I was creating. I’m posting it as-is because it’s still true even it I haven’t had to deal with HTML directly in years.
Years ago, Tim Berners-Lee set out to make the sharing of research papers easier so he devised a system which led to our current web. He devised (or reworked some existing ideas) a simple text based system to transmit the text and included some structure so the displaying program (the browser predecessor) could format the text is a reasonable way. His goal was to create a simple system for displaying text. But as time passed, and people started to see the value in linking pages, some got the idea that they could do more than just show text. More tags were added, CSS was created, and the simple model that Berners-Lee created can hardly be seen any more.
All of this slow addition of features, ideas, programming, and styling has led us to a point where one has no idea if a particular “page” will display at all let alone in the desired form. There is so much complication and so many browsers (including versions and platforms) that it really is impossible to have any idea what one will get.