I know this is basics, but somehow I forgot how this works. According to me the title bar icon, is just an icon(.ico) file you include to your code. If this is correct, what is the code ? Can any one help me on thsi one
just name the file favicon.ico and put it in your root directory. You can put some html code in your files to make different favicons for different pages, but in my experience that has been unbelievably unreliable. Do a google on favicons. You'll find everything you need to know and more.
What nevetS says and the HTML code is referring to: <link href="http://www.domain.com/someicon.ico" rel="SHORTCUT ICON"> HTML:
Oh.... let me just add this one thing - Finalize your favicon before uploading it, or if you need to test on a live site, test in the middle of the night when traffic is minimal. IE has wierd caching "behavior" and if you get the wrong favicon in there, sometimes it can be a serious pain in the butt to get rid of it or update it. You'll go through the pain to see your changes, but any visitor to your site will just deal with his cached favicon and could end up with a poor impression of your site because of the favicon - which is exactly the opposite of what you are trying to do.
Probably the best tool ever for these! http://www.html-kit.com/favicon Literally takes 2 minutes to have a favicon on your page.