HOWTO: Adding node type class to body element in Drupal 8
Method 1: edit your html.html.twig theme template
Add this line at <body{{ attributes.addClass(classes,:
node_type ? 'page-node-type-' ~ node_type|clean_class
For example:
Add this line at <body{{ attributes.addClass(classes,:
node_type ? 'page-node-type-' ~ node_type|clean_class
For example: