<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/default-styles-for-h1-elements-are-changing-4ev6ntyew" -->

---
title: Default styles for h1 elements are changing | daily.dev
description: Changes are being rolled out in browsers that remove default user agent styles for h1 elements within nested sections. Developers should ensure their websites...
canonical: https://daily.dev/posts/default-styles-for-h1-elements-are-changing-4ev6ntyew
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Default styles for h1 elements are changing | daily.dev
og:description: Changes are being rolled out in browsers that remove default user agent styles for h1 elements within nested sections. Developers should ensure their websites...
og:url: https://daily.dev/posts/default-styles-for-h1-elements-are-changing-4ev6ntyew
og:image: https://api.daily.dev/og/posts/4Ev6NtYeW.png
og:image:alt: Default styles for h1 elements are changing
og:image:width: 1200
og:image:height: 630
og:locale: en
---

[MDN Blog](https://daily.dev/sources/mdnblog)

[Read post](https://api.daily.dev/r/4Ev6NtYeW)

# [Default styles for h1 elements are changing](https://api.daily.dev/r/4Ev6NtYeW "Go to post")

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](/tags/webdev "Check all #webdev posts")[#css](/tags/css "Check all #css posts")[#html](/tags/html "Check all #html posts")[#accessibility](/tags/accessibility "Check all #accessibility posts")[#lighthouse](/tags/lighthouse "Check all #lighthouse posts")

Apr 11, 2025•5m read time•From [developer.mozilla.org](https://api.daily.dev/r/4Ev6NtYeW "developer.mozilla.org")

[![Post cover image](https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f59fcb331c3c89ebc5e188b86a49ef0b?_a=AQAEuj9)](https://api.daily.dev/r/4Ev6NtYeW "Go to post")

100 Impressions47 Upvotes4 Comments

Comment

Bookmark

Copy

![Placeholder image for anonymous user](https://media.daily.dev/image/upload/s--qsFuKGv_--/t_logo,f_auto/public/noProfile)Share your thoughtsPost

[![MDN Blog's image](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/236034d60b694d00b5fb9a5a5d6b57ae)](https://daily.dev/sources/mdnblog)

[MDN Blog](https://daily.dev/sources/mdnblog "https://daily.dev/sources/mdnblog")

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

373 Followers

•

2.3K Upvotes

#### Would you recommend this post?

Copy link

WhatsApp

Facebook

X

New Squad

Copy linkShare with your friends

47

4

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Default styles for h1 elements are changing","url":"https://daily.dev/posts/default-styles-for-h1-elements-are-changing-4ev6ntyew","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/default-styles-for-h1-elements-are-changing-4ev6ntyew"},"datePublished":"2025-04-11T01:30:06.139Z","dateModified":"2025-04-11T01:30:20.187Z","description":"Changes are being rolled out in browsers that remove default user agent styles for h1 elements within nested sections. Developers should ensure their websites...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f59fcb331c3c89ebc5e188b86a49ef0b?_a=AQAEuj9","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f59fcb331c3c89ebc5e188b86a49ef0b?_a=AQAEuj9","isAccessibleForFree":true,"articleSection":"MDN Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"MDN Blog","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/236034d60b694d00b5fb9a5a5d6b57ae","url":"https://daily.dev/sources/mdnblog"},"commentCount":4,"discussionUrl":"https://daily.dev/posts/default-styles-for-h1-elements-are-changing-4ev6ntyew","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":47},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":4}],"keywords":"webdev,css,html,accessibility,lighthouse","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"MDN Blog","item":"https://daily.dev/sources/mdnblog"},{"@type":"ListItem","position":3,"name":"Default styles for h1 elements are changing"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/default-styles-for-h1-elements-are-changing-4ev6ntyew","comment":[{"@type":"Comment","text":"It shows a change in the perceived semantic meaning of “heading level 1”, from headings in a section to headings in a page or document.\nWhereas before it could have been read as “This is the first heading level relative to this section” and “This is the first heading level relative to this subsection” etc. now heading levels can be thought of as relative to a whole page or document, similar to how heading levels work in a word processor.\nI’ve wondered why it wasn’t always this way. This follows the cognitive model of a word processor.","datePublished":"2025-04-12T19:07:06.286Z","url":"https://daily.dev/posts/4Ev6NtYeW#c-9b0OLEbRa","author":{"@type":"Person","name":"theacademe","url":"https://daily.dev/theacademe","image":"https://media.daily.dev/image/upload/s--C29_q-xW--/f_auto/v1756852849/avatars/avatar_wNAjl1VBaVx2CCjbkkb5h?_a=BAMClqZW0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2}},{"@type":"Comment","text":"Good to know, makes a lot of sense. Nice write-up too 👍🏻","datePublished":"2025-04-17T13:51:41.902Z","url":"https://daily.dev/posts/4Ev6NtYeW#c-2bzdn5Rgk","author":{"@type":"Person","name":"Peter Cruckshank","url":"https://daily.dev/petecapecod","image":"https://media.daily.dev/image/upload/s--ZJhQyKws--/f_auto/v1721235024/avatars/avatar_A9xh33q0QoxtkGoJRCosp"}},{"@type":"Comment","text":"This is going to help websites a lot! This way we can have more flexible customization. It’s a big change; HTML has been changing for the better in recent years.","datePublished":"2025-04-22T08:55:55.664Z","url":"https://daily.dev/posts/4Ev6NtYeW#c-JxfKCwkoY","author":{"@type":"Person","name":"Adrián Iglesias Fernández","url":"https://daily.dev/igledev","image":"https://media.daily.dev/image/upload/s--CH8RUAxP--/f_auto/v1745152599/avatars/avatar_S05rxn3yXtwhGdKTcyyXk"}}]}
```

