Use HTML heading tags, and not text styles to convey content structure on a webpage.
Use of heading tags (H1, H2, etc.) makes the structure of the page clear to assistive technology. It presents a clear hierarchy of content, which in turn presents page content in an organized, easy to understand way.
Use proper HTML heading tags to show content hierarchy and structure in a webpage.
For more information, visit the WCAG links for this topic.