A Blog Post with Every HTML Element
patrickweaver.net
patrickweaver.net
The author is too young to remember frames, huh? :) I'd just link the Wikipedia article ( https://en.wikipedia.org/wiki/Frame_(World_Wide_Web) ), but I feel like it doesn't explain it very well.
So, to briefly explain -- in the early web (OK, not the really early web, but once it got popular) frames were very common. They were commonly used for menus/sidebars, as well as things like headers that were meant to stay visible. So perhaps a page would have three frames -- a frame up top with a persistent header, one on the left with a sidebar, and then one main frame with the content.
Each frame acted fairly independently, with e.g. its own back/forward history (a link in a frame would by default only affect that frame, although you could have links in one frame open in another, useful for implementing a sidebar). This meant using back/forward/reload/etc with frames could be pretty troublesome and unintuitive. If you somehow got a page into a messed-up state where the wrong thing was loaded in one frame, it could be hard to get out of this state other than by navigating to the page from the start. Or it could be troublesome if you accidentally loaded just the content page without the framing page it was supposed to be a part of.
CSS got rid of most of the use case for frames, which is good, because frames were a real pain to deal with as a user!
I think this was actually a pretty good use case for frames, especially back before browser tabs existed. It was nicer to run through a list of links in one window with frames than to jump back and forth through history or juggle multiple windows.
I remember everyone at my university using it for quite a while, then google came out we were floored with the simplicity of it's home page (imagine what ten 1999 yahoo search competitor results crammed into one page looked like :D )
Later I learned about AskJeeves from a cousin who showed me how to download emulators and ROMs (this would have been in the mid-late 90s).
It's funny to think how much of my early tech experiences came from in person interactions. Dad's friend also built the first computer which I owned, which belonged to my grandma until she got a shinier Dell pre-built for a birthday.
I was allowed to "purchase" that machine for the price of two free mows (so $40). This was a steal by any metric. It became the foundation for basically all my computer learning into my preteen and teen years and the centerpiece of my bedroom. I have many fond memories of kicking back in my bedroom with ZSNES or bootleg Family Guy episodes.
Idk that I'd really connected until today how much of an influence that friend of my dad's had on my life, just through a few simple acts of thinking the net was cool and sharing with my family.
> Nightly Can’t Open This Page
> To protect your security, www.w3.org will not allow Nightly to display the page if another site has embedded it. To see this page, you need to open it in a new window.
> Learn more…[1]
> [Open Site in New Window]
[1]: Links to https://support.mozilla.org/en-US/kb/xframe-neterror-page
Dear end-user, do you need therapy? I'll make sure that message is removed in the next release, so other end-users are not subjected to such horribly frightening information.
> Refused to frame 'https://www.w3.org/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self' https://cms.w3.org/".
Everything I've seen still does clip, or positions the content off the side of the page, or something like that. How is this not just an alternative "display" value, or an additional property?
There's been a "speak" property floating around in one of those theoretical CSS modules that would accomplish this but as far as I know it has zero uptake among implementers.
ARIA attributes allow for that.
https://developer.mozilla.org/en-US/docs/Web/Accessibility/A...
Example code.
https://stackoverflow.com/questions/26032089/in-html-how-can...
Note that the very SO thread you linked to goes immediately to doing position/clipping tricks right after mentioning aria-label.
[1] https://www.tpgi.com/short-note-on-aria-label-aria-labelledb...
I wonder if a whitespace <div> with a right aria-label could fit the bill.
Further point, in case you still disagree whether it makes sense for CSS to include the ability or not: CSS supports pseudo-elements but that doesn't mean tags in your page should be turned into pseudo-elements just because you can.
Aria-label only works on interactive elements. I believe except the div has a `role`, screenreaders will ignore the label.
> I was initially surprised that it survived to HTML 5 (while <menuitem> didn’t) because modern browsers treat it as essentially a <ul>. Researching further on Wikipedia I read: "MENU existed in HTML Tags, and was standardized in HTML 2.0; deprecated in HTML 4.0 Transitional; invalid in HTML 4.0 Strict; then redefined in HTML5, but removed in HTML 5.2," and now I don’t know what to think.
HTML 5.2 was retired by W3C in 2021 in favour of the WhatWG HTML Living Standard, which (unlike HTML 5.2) never deprecated <menu>, and has been redefined as representing "a toolbar consisting of its contents, in the form of an unordered list of items (represented by li elements), each of which represents a command that the user can perform or activate.".
Wikipedia's list of elements seems to be out of date here — along with a lot of the Wikipedia information on HTML versions — as the <menu> element is still alive. Given its history of being repeatedly deprecated, and the fact that event recently browsers were confused by exactly what semantics to assign to <menu>, you are probably nearly always better off using <ul> with an appropriate ARIA role attribute (toolbar, menu, or menubar).
I was excited when <details> and <summary> landed in all evergreen browsers for example, but just to get the content to slide open (guiding the user) instead of pop open requires JS (the best implementations I've seen use WAAPI), Safari adds a proprietary pseudo element, etc.
It is possible to have sliding animations without JS, it just isn't very pretty on close (on open looks fine):
https://codepen.io/dada1smo/pen/LYydWBg
(note, that is not mine, I found it via a comment on a css-tricks link).
[1]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/smallSpecifically, how does nesting details/summary tags relate to 5 MB of HTML, and how does that relate to breaking a lot of browsers?
Sounds like a great story, and I’d love to hear it!
> go left
> go right
Where each of those is a branch in the story. Even if both branches converge eventually, all possibilities need to be in each branch. And so on. The number of summary tags is n! where n is the number of possible decisions.
Thus you very, very quickly end up with a very large dom. Browsers aren’t really optimized to display hundreds of thousands of these tags, so they crashed.
It was basically a site that listed all the HTML tags and what they did.
That plus a text editor and early version of Netscape Navigator was all you needed, and you were off to the races to learn and experiment!
I no longer struggle to read HN on a wide browser which display 250 characters on a single line. Each paragraph is readable, and the paragraph breaks are visibly higher than the line-height.
@-moz-document domain(news.ycombinator.com) {
.comment {
font-size: 12px;
line-height: 1.75em;
padding: 10px 0 10px 0;
max-width: 64ch;
display: block;
}
.commtext {
font-size: 12px;
line-height: 1.75em;
padding: 10px 0 10px 0;
max-width: 64ch;
display: block;
}
}There's definitely room for improvement but I don't think it looks half-bad: https://i.stack.imgur.com/xcyoE.png
@-moz-document domain("news.ycombinator.com") {
body {
font-family: -apple-system, "Adobe Clean", -apple-system, Helvetica, sans-serif !important;
font-size: 11pt;
color: #828282;
background-color: #1B2835 !important;
}
* {
font-family: -apple-system, "Adobe Clean", -apple-system, Helvetica, sans-serif !important;
}
* code {
font-family: "Fira Code", "Monaco", "Consolas", "Courier New", monospace !important;
margin: 0;
padding: 0;
font-size: 0.9em;
}
code:before {
content: "⬤⬤⬤";
position: absolute;
top: 5px;
left: 12px;
color: #ccc;
letter-spacing: 3px;
-webkit-text-fill-color: #ccc; /* Will override color (regardless of order) */
-webkit-text-stroke-width: 1px;
-webkit-text-stroke-color: #223b4f;
}
code:before::first-letter {
color: #ff5f56 !important;
}
pre {
background-color: #234 !important;
border-radius: 15px;
padding: 30px 0px 10px;
border: 0.5px solid #223B4F !important;
box-shadow: inset 0 0 1px #123;
position: relative;
}
table#hnmain{
background-color: #1B2835 !important;
}
a:link {
color: #bfbfbf !important;
text-decoration: none;
}
.c00 {
color: #cecece !important;
}
.cdd {
color: #768696 !important;
}
.c5a {
color: #465666 !important;
}
}But every implementation of styles like this seem to require some sort of detailed knowledge of CSS to wrangle it into working order.
It's also fun to see the author ponder some of the older and now unused elements, speculating on their use, when "back in the day" they were thrilling to suddenly have access to.
That said, handcrafting HTML through every rev since Mosaic, I don't like MDN because of retcon changes like "description list". I prefer original spec, "definition list".
To me dl, dt, dd, makes more sense to think of as "definition list", with defined terms, and defined definitions.
OK, description is broader than definition, but for me, definition is easier to remember the list (dl) has terms (dt) and definitions (dd).
And W3 calls it "definition list":
The restaurant menus would always reach into insane levels of hierarchy, mostly because many of them made way too many things. Sometimes you need the:
Restaurant -> Menu -> Antipasti -> For Groups -> Fried -> Cheesy
hierarchy to feature the mozza sticks and arancini correctly.
<article>
<h1>Title</h1>
<section>
<h2>Section</h2>
<section>
<h3>Sub Section</h3>
<section>
<h4>Sub Sub Section</h4>
</section>
</section>
</section>
</article>
You could simply use <h2> repeatedly and keep the semantic structure of the former. <article>
<h1>Title</h1>
<section>
<h2>Section</h2>
<section>
<h2>Sub Section</h2>
<section>
<h2>Sub Sub Section</h2>
</section>
</section>
</section>
</article>
However this was never implemented by any browser or screen reader and was finally dropped from the standard.http://html5doctor.com/computer-says-no-to-html5-document-ou...
I understand why some people might not like xhtml2, but it did have some good ideas for creating a semantic document
Example: https://www.w3.org/TR/2010/NOTE-xhtml2-20101216/mod-structur...
Really helpful to see it all in one place!
In practice, any sane screen reader or default visual style will treat them exactly the same.