Search code examples
typo3typoscripttypo3-6.2.x

TYPO3 renders header as h2 not as h1


My TYPO3 ver.: 7 renders the content element header as h2 and not as h1 ... how can I solve this issue?

enter image description here

enter image description here


Solution

  • The typoscript you showed sets the default header level to 2 aka <h2>...</h2>

    styles.content.defaultHeaderType = 2
    

    You can change this behavior by changing that value via typoscript

    styles.content.defaultHeaderType = 1
    

    This setting needs to be done in the constants field of a typoscript template.

    A little more information can be found at https://buzz.typo3.org/people/ron-hall/article/changing-the-default-header-for-content-elements/