I tried googling and I got a lot of hits for what reader mode does and how to enable it, but nobody can explain what the browser is actually doing.

Do sites have pared-down versions of their pages specifically for reader mode? Or does the browser just scan for particular HTML tags?

you are viewing a single comment's thread
view the rest of the comments
[–] 26 points 3 months ago (1 child)

A web page is a combination of a structured document and a separate stylesheet. The same structured document can be styled in radically different ways just by changing the stylesheet. This is how a website can offer different skins, light/dark mode, etc.

Consider this basic HTML document:

<html>
   <head><title>Test Page</title></head>
   <body>
      <p>This is a paragraph.</p>
      <ul>
         <li>This is an unordered bullet-point list item</li>
         <li>This is also a list item</li>
      </ul>
   </body>
</html>

And here's a stylesheet to make the bullet points square:

ul {
  list-style-type: square;
}

Change the stylesheet and you change how the document is rendered. "Reader mode" is just a minimalist stylesheet built into the browser.

  • source
  • hideshow 1 child comment