How to put <h1>, <h2> tags in legend of <p:fieldset>?

Viewed 189

Using a library of components like Primefaces speeds up development with JSF (and has many other advantages!).

From a Search Engine Optimization (SEO) perspective, however, components are not ideal. For example, in Primefaces I can use a sort of panel called a fieldset:

<p:fieldset legend="Title of my panel">
    <p>
       Content of my panel
    </p>
 </p:fieldset>

The title of the panel (set with the attribute "legend" of the fieldset) would have been a good candidate to put inside a <h2> or <h3> tag, because they are important subtitles in the page and search engines rely on these tags for their indexing. Using the fieldset component seems to prevent using <hn> tags in the titles of these components?

Is there a way I can have both? Primefaces components like fieldset with h1, h2, h3 tags for the titles of these components?

1 Answers
Related