How to add custom classes to a WordPress theme HTML tag?

There is no designated template tag for classes on html container.

For example in latest core Twenty Seventeen theme they are hardcoded:

<html <?php language_attributes(); ?> class="no-js no-svg">

For proper customization you would likely need to create a child theme and override repsective template (likely header.php) or settle on manipulating classes with JavaScript.