indexOf should work as told, just for an
alternative you could use string.Contains() method.
string str = "<h1>some_unnecessary_string</h1>";
Example for contains method:
bool result = str.Contains("<h1>");
or regular expressions for a complete tag search:
bool result = check(str);
bool check(string source)
{
return new Regex("<h1>.*?</h1>").IsMatch(source);
}