HTML Concepts: Unstyled Documents
Published on November 22, 2022, filed under Development (RSS feed for all categories).
Welcome back!
What is an unstyled document? (What is your expectation?) When I thought about this question, my immediate response was âa document without styling information, but styled according to user agent styles.â
For us used to working with CSS, that probably is âunstyled.â But the HTML specification has a special section about unstyled documents. Under Unstyled XML documents it describes what, precisely, a âfullyâ unstyled document is.
An unstyled document is a document that:
- has no author style sheets,
- has no (meaning none of its elements has any) presentational hints,
- has no style attributes,
- is not in the HTML, SVG, or MathML namespace,
- has no focusable area (other than the viewport),
- has no hyperlinks,
- doesnât have a
Window
object, and - has no registered event listeners.
How does this look like?
Such a document would not be rendered according to CSSâand could therefore âjust result in a wall of text.â
However, it could be displayed in other forms, and the HTML specification puts developers first here: Such an unstyled documentâwhich should be something that the browser represents using a DOMâcould be ârendered in a manner that is useful for a developer,â as with syntax highlighting or a visualization of the respective document tree.
Figure: An otherwise unstyled feed with some voluntary styling.
But⊠is this an HTML document, and therefore concept?
No, itâs notâbut I thought it may be of interest to look at fully unstyled documents đŹ (Next time itâs fully about HTML again.)
Many thanks to Simon Pieters for reviewing and sharing feedback on this post!
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: Upgrade Your HTML IV
- Previous: Website Optimization Measures, Part XVI
- More under Development
- More from 2022
- 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.