[The documentation for the html.tpl.php template][1] documents the `$classes` variables as *String of classes that can be used to style contextually through CSS.*. If you look at the code for the template, this variable is used in the class attributes of the produced body element:
<body class="<?php print $classes; ?>" <?php print $attributes;?>>
The `$classes` variables is actually already set by [`template_process()`][2] for any template file and build from the content of the `$classes_array` variable.
So to add a class to the body of your page, you should add this class to the `$classes_array` value from your theme (or module)'s implementation of `hook_preprocess_html()`:
function THEME_preprocess_html(&$variables) {
$variables['classes_array'][] = 'new-class';
}
Since this is the _core_ defined template and process function, any well-behaving theme should re-use the same variables.
[1]:
[To see links please register here]
[2]:
[To see links please register here]