TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A sewing page that never closed its font size HTML tags

367 pointsby cjlmalmost 4 years ago

31 comments

dada78641almost 4 years ago
In case anyone is interested, this is what it looks like on Internet Explorer 5 in Windows 9x: <a href="https:&#x2F;&#x2F;i.imgur.com&#x2F;g668yBy.png" rel="nofollow">https:&#x2F;&#x2F;i.imgur.com&#x2F;g668yBy.png</a><p>What&#x27;s happening is that the &lt;h3&gt; tags are all nested, since they don&#x27;t auto-close in this situation, and modern browsers define the &lt;h3&gt;&#x27;s size as &quot;font-size: 1.17em;&quot; which of course adds up over time. I&#x27;m not sure how IE5 interprets the page. Maybe I can get an older embedded version of Firebug to check.<p>I think it&#x27;s important to not break even older websites even if they have totally busted HTML, but this is probably such a rare case that no one ever thought of it, and at this point it&#x27;d probably be much more disruptive to try and &quot;fix&quot; it.
评论 #28060514 未加载
评论 #28063550 未加载
评论 #28070391 未加载
goto11almost 4 years ago
The font-tags are getting unfairly blamed!<p>The increasing size is due to the unclosed &lt;h3&gt; tags combined with unclosed inline level tags. This is parsed into a nested structure, with h3&#x27;s nested into h3&#x27;s deeper and deeper. The font-size of h3 is defined as relative increase, so the nested h3-elements get increasingly larger size.<p>The effect can be reproduced with this HTML snippet:<p><pre><code> &lt;h3&gt;&lt;span&gt;hello &lt;h3&gt;&lt;span&gt;hello &lt;h3&gt;hello </code></pre> Which is parsed as:<p><pre><code> &lt;h3&gt; &lt;span&gt;hello &lt;h3&gt; &lt;span&gt;hello &lt;h3&gt;hello&lt;&#x2F;h3&gt; &lt;&#x2F;span&gt; &lt;&#x2F;h3&gt; &lt;&#x2F;span&gt; &lt;&#x2F;h3&gt; </code></pre> Usually a h3 would be automatically closed when a new h3 (or any block-level element) is encountered, but because of the unclosed inline element (span in the above example) it is instead parsed as a nested structure. In OP it is unclosed font-tags which cause the h3&#x27;s to nest, but it has nothing to do with the semantics of &lt;font&gt; per se, it is just because they are unclosed.<p>So why did it look correct in old IE? I think this comes down to the built-in browser style-sheet. I suspect h3 is defined with an absolute font size in the IE browser style sheet which means nesting does not increase the size.
noduermealmost 4 years ago
I&#x27;m kinda just pulling this out of the swamp of 25-year-old web design knowledge, but the unclosed code on that page consists of &lt;font&gt; tags, which are long since deprecated, and those font tags have size=&quot;2&quot; &#x2F; size=&quot;-2&quot; attributes. I&#x27;m pretty sure the old behaviour was that &lt;font size=&quot;[signed int]&quot;&gt; affected the size <i>relative to the parent</i> in the same way that CSS &quot;font-size:200%;&quot; or &quot;font-size:50%;&quot; would do. So nesting them doesn&#x27;t create any new block elements, but it modifies the font size within a &lt;td&gt; or &lt;p&gt; relative to the parent. Just at a look, that seems like the explanation for the increase in font size, in this admittedly odd document.<p>[edit] I believe the page would look <i>as intended</i> if each &lt;font&gt; tag overrode the prior unclosed &lt;font&gt; tag, rather than treating it as a parent, and that was probably how IE 6 interpreted it. In fact I think old browsers would auto-close &lt;&#x2F;font&gt; if you wrote a new &lt;font&gt;.
评论 #28058879 未加载
评论 #28058729 未加载
评论 #28070894 未加载
tdeckalmost 4 years ago
There is a StackOverflow thread about this page and why it may have looked OK in older browsers: <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;14787255&#x2F;why-are-unclosed-h3-tags-breaking-this-page" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;14787255&#x2F;why-are-unclose...</a>
评论 #28058050 未加载
评论 #28057986 未加载
ljp_206almost 4 years ago
I have this page backed up personally on my machine. I love it so dearly, whenever I find myself scrolling through it again I always end up cackling with laughter.
评论 #28058054 未加载
SquibblesReduxalmost 4 years ago
The obvious solution to the web page&#x27;s problem appears at the bottom of the page:<p>&quot;If a problem persists, we recommend that you contact Sewing and Embroidery Warehouse&quot;
评论 #28057192 未加载
dangalmost 4 years ago
Past threads:<p><i>This website has a lot of unclosed h3 tags</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7351838" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7351838</a> - March 2014 (132 comments)<p><i>Don&#x27;t forget to close your HTML tags</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5194843" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=5194843</a> - Feb 2013 (11 comments)
jjicealmost 4 years ago
I haven&#x27;t thought about styling tags like `&lt;center&gt;` and `&lt;font&gt;` in quite some time, and I&#x27;m glad for it. CSS is quite the wonder and I&#x27;ll never talk bad about it again after this reminder.
评论 #28057704 未加载
raszalmost 4 years ago
nested H3 tags with:<p><pre><code> h3 { font-size: 1.17em; </code></pre> &quot;(historically the em unit was derived from the width of a capital &quot;M&quot; in a given typeface.). The numeric value acts as a multiplier of the font-size property of the element on which it is used.&quot;<p>So this used to work and look normal.
评论 #28056962 未加载
评论 #28057134 未加载
评论 #28058452 未加载
ascomalmost 4 years ago
FWIW this website appears normal in Internet Explorer compatibility mode (i.e. IE7 mode).<p>You&#x27;ll probably have to jump through hoops to actually get it to open in Windows 10 though...
jasonladuke0311almost 4 years ago
This is one of the funniest things I have ever seen. I was reading this on my phone in bed last night and couldn&#x27;t breathe because of how hard I was laughing.<p>It looks like some postmodern piece of art.
评论 #28065972 未加载
armchairhackeralmost 4 years ago
There are 1.86 billion websites online right now, many more that used to be online, and over 1.2 million TB data. Probably a lot of it is generic content or machine-generated, but I wonder how many unique, weird sites there are like this.
ashton314almost 4 years ago
Recommend viewing on mobile
frankwilesalmost 4 years ago
Damn I love the Internet!
pontifieralmost 4 years ago
Some of the snippets of giant, screen-filling text, are very funny.
评论 #28056511 未加载
geocrasheralmost 4 years ago
That escalated quickly.
de6u99eralmost 4 years ago
The title is not correct. It should be Header tags. But then on the other side, I only clicked on your post because I was curious what a font size tag is LOL
neonnoodlealmost 4 years ago
This web site is too loud
评论 #28057536 未加载
fao_almost 4 years ago
I see someone else has been reading YOSPOS?
评论 #28057248 未加载
taejavualmost 4 years ago
At one point in time, the Timecube website had the same presentation. Made it even more enjoyable.
pwdisswordfish8almost 4 years ago
Next time someone sings the praises of so-called ‘Postel’s law’, show them this.
mensetmanusmanalmost 4 years ago
If this was a skit, it would be a teacher yelling louder and louder explaining all the things that can go wrong with the machines until a sonic boom destroys the classroom.
yyxalmost 4 years ago
Seen the same happen 5 years ago on some Rainbow band fan site. It even could reliably crash firefox.
dredmorbiusalmost 4 years ago
This site best viewed with Lynx.
评论 #28057637 未加载
9214almost 4 years ago
That escalated pretty quickly.
Static2280almost 4 years ago
This should be turned into a linerider map!
raxxorraxalmost 4 years ago
Your eyesight will get worse with age.
itronitronalmost 4 years ago
I would have guessed this was made with Bootstrap if the title didn&#x27;t mention the font tag thing. All it&#x27;s missing is a hero image.
bryanrasmussenalmost 4 years ago
how much work would it take to reduplicate this effect exactly in CSS?
评论 #28058861 未加载
cannabis_samalmost 4 years ago
This is so lovely!
ChrisMarshallNYalmost 4 years ago
MY EYES MY EYES