Jens Oliver Meiert

Get 15% off on select books on Gumroad—use discount code “testdrive”.

HTML Concepts: “Body-Ok”

Post from May 4, 2021 (↻ May 27, 2021), filed under .

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.

Screenshot: What is “body-ok”?

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 are dns-prefetch, modulepreload, pingback, preconnect, prefetch, preload, prerender, and stylesheet.

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

Jens Oliver Meiert, on September 30, 2021.

I’m Jens, and I’m an engineering lead—currently manager for Developer Experience at LivePerson—and author. I’ve worked as a technical lead for Google, I’m close to W3C and WHATWG, and I write and review books for O’Reilly. I love trying things, sometimes including philosophy, art, and adventure. Here on meiert.com I share some of my views and experiences.

If you have a question or suggestion about what I write, please leave a comment (if available) or a message. Thank you!

Read More

Maybe this is interesting to you, too:

Looking for a way to comment? Comments have been disabled, unfortunately.

Cover: The Web Development Glossary.

Get a good look at web development? Try The Web Development Glossary (2020). With explanations and definitions for literally thousands of terms from Web Development and related fields, building on Wikipedia as well as the MDN Web Docs. Available at Apple Books, Kobo, Google Play Books, and Leanpub.

Stay up-to-date? Learn about new posts by feed or on Twitter.

Found a mistake? Email me, jens@meiert.com.

You are here: HomeArchive2021 → HTML Concepts: “Body-Ok”

Last update: May 27, 2021

Professional frontend developers produce valid HTML and CSS.