Search code examples
searchopen-source

How to search the web for pages containing certain source code?


I wanted to find the origin page of a CSS file that somebody once included in a project I'm working on. Unfortunately, the guy that included it didn't write where from it came and has only a vague memory that 'somebody' sent the source file to him.

I wanted to search the web for pages with this css rule #loginNemId .inner { ... }

but nothing showed up on a google search for #loginNemId. Same reult when searching for id="loginNemId" as part of the page's source code. For completeness sake, I also searched for an included background image "bgLoginNemId.png", but that was also unsuccessful.

I really would like to know:

  • what is the best way to search for text in HTML files source code?
  • is there a way to search for content in CSS files or blocks within the HTML?

Solution

  • To sum up the other answers, it seems there is currently no way to search for text in HTML source code.

    There is one exception ot this rule: if the code you search for is open-source and indexed by Google Code Search.