MDN Blog
Read post

Default styles for h1 elements are changing

Changes are being rolled out in browsers that remove default user agent styles for h1 elements within nested sections. Developers should ensure their websites do not rely on these default styles to avoid issues flagged by tools like Lighthouse. Explicitly defining font sizes and margins for heading elements is recommended. Specific instructions are provided for different browsers and tips on updating CSS to conform to these changes.

    #webdev#css#html#accessibility#lighthouse
Apr 11, 2025•5m read time•From developer.mozilla.org
Post cover image
96 Impressions4 Comments
MDN Blog's image
MDN Blog

MDN Blog is a platform or publication associated with Mozilla Developer Network (MDN), offering arti...

371 Followers

•

2.3K Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard