K
last year
Kanishacountry asked

Why should we not use <h5> after using <h2>?

Abhay Jajodia
Expert
last year
Abhay Jajodia answered

In HTML, you should avoid skipping heading levels (using

after

) because it can make your web page confusing and difficult for screen readers or search engines to interpret.

HTML headings are more than just a way to make text larger or bolder; they serve as an important part of the document's structure, creating a hierarchy of information.

For example, using a heading like

followed immediately by
can imply that there's missing information (like a

or

) between important sections that you're skipping, which might not be the case.

Instead, try to keep headings in order, like using

followed by

, and so forth, so it's clear how each section relates to the others.

Hope this helps clarify things. Let me know if you have any more questions!

HTML
This question was asked as part of the Learn HTML course.