Default styles for h1 elements are changing | MDN Blog
Briefly

The HTML specification previously included an outline algorithm that assigned implicit heading levels to nested sectioning elements. This created confusion among developers regarding the appropriate use of <h1> elements and how browsers rendered headings. Although the algorithm was removed in 2022 from the specification, the browser default styles that dictated how these headings were displayed remain in effect, leading to further complexities. As browser vendors begin to phase out these outdated styles, developers are left adapting to a system that has changed but inconsistencies still persist in implementation.
The outline algorithm automatically assigned semantic heading levels to nested sectioning elements, creating confusion among developers regarding the appropriate use of <h1> elements.
Despite the removal of the outline algorithm from the HTML spec in 2022, browser default styles still implement nested font-size and margin changes based on this outdated system.
Read at MDN Web Docs
[
|
]