Adding a class to the body tag
TYPO3 usually generates the body tag of your HTML output, so how do you add classes to the body tag? It can be easily done using TypoScript.
page.bodyTagAdd = class="myclass"
This can of course also be used to add other attributes to the body tag:
page.bodyTagAdd = class="myclass" data-mydata="1"
Or you can replace the entire body tag using:
page.bodyTag = <body class="myclass" data-mydata="1">