Code snippet that can be used to add a specific css class to webforms/forms form tag in Drupal 8.
/**
* @param $form
* @param $form_state
* @param $form_id
*/
function mymodule_form_alter(&$form, &$form_state, $form_id)
{
if ($form_id == 'webform_submission_contact_add_form') {
// add class to tag <form>
$form['#attributes']['class'][] = 'my-custom-class';
}
}