HTML Formatting “single_term_title()”?

There’s nothing about single_term_title(), or any WordPress template tags, that would prevent surrounding HTML from formatting it correctly. All these tags do is output their value. The formatting and appearance of that text is determined by the HTML that is surrounding it, and what your CSS rules are, according to the standard rules of HTML an CSS that apply to all websites. For example, one reason that your text might not appear the way you want is because your theme may lack specific styles for <h1> tags without a class.

EDIT: In double checking the documentation for single_term_title(), I can see that you’re using it incorrectly. By default single_term_title() echoes its output, which means that rather than assigning the value to a variable, $titlehere = single_term_title(); is just echoing the title, which means that the result is:

Term title here
<h1></h1>

To properly wrap single_term_title(); in an HTML tag you need to either echo the tags before and after it:

echo '<h1>';
single_term_title();
echo '</h1>';

Or use the set the second $display argument of single_term_title() to false so that the function returns, rather than echoes:

$titlehere = single_term_title( '', false );
echo '<h1>' . $titlehere . '</h1>';