News for hackers. Stuff that matters.
Re:A sewing page that never closed its font size HTML tags by tdeck on Wednesday August 04, 2021 @12:40AM (#28057362)
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-unclose...
Re:A sewing page that never closed its font size HTML tags by brainlessdev on Wednesday August 04, 2021 @02:56AM (#28058050)
The OP of that question is Manishearth, from the Rust core team!
Re:A sewing page that never closed its font size HTML tags by majewsky on Thursday August 05, 2021 @05:35AM (#28071544)
I suppose he was working on Servo when looking into this sort of question.
Re:A sewing page that never closed its font size HTML tags by gpvos on Wednesday August 04, 2021 @02:46AM (#28057986)
Sorry, I can't find where it discusses why it may have looked fine in the past, can you point me to it more precisely?
Re:A sewing page that never closed its font size HTML tags by gpvos on Wednesday August 04, 2021 @02:51AM (#28058014)
Ah, found it in one of the earlier HN threads: https://news.ycombinator.com/item?id=7352391
Re:A sewing page that never closed its font size HTML tags by nefitty on Wednesday August 04, 2021 @03:08AM (#28058135)
The image linked there doesn’t exist
Re:A sewing page that never closed its font size HTML tags by gpvos on Wednesday August 04, 2021 @03:28AM (#28058263)
The explanation is there however, see the next comment.
Re:A sewing page that never closed its font size HTML tags by ndkwj on Wednesday August 04, 2021 @03:08AM (#28058133)
It looks okay on internet explorer with compatibility view on.
Re:A sewing page that never closed its font size HTML tags by gpvos on Wednesday August 04, 2021 @03:29AM (#28058270)
But, as has been asked many times, WHY?
Re:A sewing page that never closed its font size HTML tags by goto11 on Thursday August 05, 2021 @03:35AM (#28070912)
Because 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.
Re:A sewing page that never closed its font size HTML tags by tdeck on Thursday August 05, 2021 @01:16AM (#28070143)
It'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.
Re:A sewing page that never closed its font size HTML tags by gpvos on Tuesday August 17, 2021 @02:45PM (#28213372)
If 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.