Conditional Template Classes in WordPress

For singe post vs feed:

<header class="entry-header 
  <?php 
    if ( is_single() ) : 
      echo 'container'; 
    endif; 
  ?>
">
</header>

For context, this code would be inside of

๐Ÿ“ theme > ๐Ÿ“ template parts > ๐Ÿ“„ content.php

Where ๐Ÿ“„ content.php is being called within multiple templates:

๐Ÿ“„ index.php
๐Ÿ“„ single.php

The ๐Ÿ“„ content.php conditionally displays content based on what template it is being displayed inside of.