dai11y 10/05/2021

Your daily frequent11y newsletter, brought to you by @ChrisBAshton:

Should you use an <h1> in email code?

  • A thorough investigation by Mark Robbins, looking at the state of webmail across a dozen different providers.
  • 60% of screen reader users prefer pages containing just one <h1> with the document title, whereas 33.3% prefer two <h1> headings, for the site name and the title.
  • Given a preference for one <h1> tag per page, the question is: should you include a <h1> in the emails you send people, or would that conflict with a <h1> that already exists in the webmail client? In other words, when viewing an email on gmail.com, how many <h1> tags are there?
  • Mark found that most webmail clients don’t add a <h1> to the page when viewing an email. I verified this by opening an email on gmail.com and inspecting the subject line, which is marked up as a <h2>. A couple of webmail providers do include a <h1> in the page, but their market share is low, and leaving out <h1> tags would do more harm to the many users of the other webmail clients.
  • Mark’s advice is to therefore include a <h1> tag in your emails. That’s easier said than done, of course – it only really works for email designers using professional services such as Mailchimp. For one person sending an email to another person, it’s not so easy.

Prefer longer newsletters? You can subscribe to week11y, fortnight11y or even month11y updates! Every newsletter gets the same content; it is your choice to have short, regular emails or longer, less frequent ones. Curated with ♥ by developer @ChrisBAshton.

Loading...