When creating a modal in HTML (dialog window displayed on top of the current page), what is the most appropriate when putting HTML heading on the top of div?:
H1? H2? What is the most correct?
When creating a modal in HTML (dialog window displayed on top of the current page), what is the most appropriate when putting HTML heading on the top of div?:
H1? H2? What is the most correct?
Copyright © 2021 Jogjafile Inc.
The MDN docs suggest against using multiple
h1
elements on the page in this manner:I do not suspect there is a standard for this otherwise, and would advise using the level of element that makes the most sense based on the rest of your page. And if you are concerned about semantics, you may want to consider using a
<dialog>
element (docs) rather than a<div>
.