The second aproach is better, because you usually want only one h1
element in each page and h2
is more popular in describing
subheadings and dividing the content into major sections. Using proper headings in HTML is very important in SEO. Here are the usecases of each h
element in HTML.