Abstract: The present invention is directed to a method and system for finding and visually highlighting HTML code by directly clicking in the web page. According to one embodiment of the present invention, an event interface of each browser Document Object Model (“DOM”) element that is rendered on the web page is connected to. The DOM element HTML code is retrieved when a mouse click event on the web page occurs. The element HTML code is highlighted in the code window by finding a directly matching string sequence or using a string matching algorithm.