5 ms·
There is a StackOverflow thread about this page and why it may have looked OK in older browsers: https://stackoverflow.com/questions/14787255/why-are-unclosed-h
by tdeck 5y ago
There is a StackOverflow thread about this page and why it may have looked OK in older browsers: https://stackoverflow.com/questions/14787255/why-are-unclosed-h3-tags-breaking-this-page https://stackoverflow.com/questions/14787255/why-are-unclose...
- gpvos 5y agoSorry, I can't find where it discusses why it may have looked fine in the past, can you point me to it more precisely?
- gpvos 5y agoAh, found it in one of the earlier HN threads: https://news.ycombinator.com/item?id=7352391 https://news.ycombinator.com/item?id=7352391
- ndkwj 5y agoIt looks okay on internet explorer with compatibility view on.
- gpvos 5y agoBut, as has been asked many times, WHY?
- deleted 5y ago[deleted]
- tdeck 5y agoIt's because some browsers close the currently open heading tag when they encounter a new one (since these tags can't be nested) and others do not. Since the text size is applied as an H3 style and is relative to the parent, the nesting of these tags (or not) determines whether the effect of the style is cumulative.
- gpvos 5y agoIf I understand the other arguments correctly, IE also saw them as nested, but defined the text size of h[1-6] elements as absolute, not relative.
- goto11 5y agoBecause in old IE, <h3> was defined with an absolute font size in the built-in style sheet, in newer browsers it is defined as a relative size. Since we have nested <h3>'s they get increasingly bigger in newer browsers, but in old IE they would all have the same size.
- brainlessdev 5y agoThe OP of that question is Manishearth, from the Rust core team!
- majewsky 5y agoI suppose he was working on Servo when looking into this sort of question.