Is there a way to search for a specific string in the <head> section of a website, for example? I want to search for certain snippets of html code in websites on the internet but am not sure if this is possible. Best would be to be able to search code and content simultaneously for different strings. I tried googling it but came up empty-handed, presumably because it either doesn't exist or I don't quite know what search terms to use to find it. Any help is greatly appreciated!
No. Google only displays the text of the page. Any Html code is used internally by Google for ranking the page.
I can easily accept that google doesn't provide this functionality, but I am surprised that no independent search engines do this. It seems so easy and potentially useful.
Maybe there is one out there. It would come in handy. There are probably some scripts floating around that does this however, and probably used for nefarious deeds by some shady people.
That is for searching code snippets of Php, Perl, etc. It is not for searching the Html inside of web pages.