HTML Concepts: “Body-Ok”
Published on May 4, 2021 (↻ May 27, 2021), filed under Development (RSS feed for all categories).
On Twitter, I like to run little polls. They’re often about HTML. These last days I ran one about “body-ok.” I asked, what is that?
When I took the screenshot below, more than 60% thought “body-ok” wouldn’t exist, when others related it to some sort of emphasis of content (as part of the document body), or the fact that you can omit the body
tags.
Figure: What is “body-ok”?
But “body-ok” relates to link type keywords, and denotes what link
elements are okay to be used in the document body (as opposed to its head). Here’s what the spec says:
Keywords that are body-ok affect whether
link
elements are allowed in the body. The body-ok keywords aredns-prefetch
,modulepreload
,pingback
,preconnect
,prefetch
,preload
,prerender
, andstylesheet
.
The section describing the link
element adds:
This [being allowed in the body] means that the element can be used where phrasing content is expected.
That is “body-ok” in HTML.
As for the currently 17 link types that are not body-ok… let’s say that I happen to cover them somewhere, too. This does include chapter 6 of my upcoming booklet, Upgrade Your HTML III. Get notified through Leanpub as soon as it gets released! And, if you like, follow me for more HTML polls on Twitter 📊
About Me
I’m Jens (long: Jens Oliver Meiert), and I’m a frontend engineering leader and tech author/publisher. I’ve worked as a technical lead for companies like Google and as an engineering manager for companies like Miro, I’m a contributor to several web standards, and I write and review books for O’Reilly and Frontend Dogma.
I love trying things, not only in web development (and engineering management), but also in other areas like philosophy. Here on meiert.com I share some of my experiences and views. (Please be critical, interpret charitably, and give feedback.)
Read More
Maybe of interest to you, too:
- Next: Engineering Management Ă—12
- Previous: Code in Quarantine
- More under Development
- More from 2021
- Most popular posts
Looking for a way to comment? Comments have been disabled, unfortunately.
Get a good look at web development? Try WebGlossary.info—and The Web Development Glossary 3K. With explanations and definitions for thousands of terms of web development, web design, and related fields, building on Wikipedia as well as MDN Web Docs. Available at Apple Books, Kobo, Google Play Books, and Leanpub.