Posted By: Anonymous
How do I add image in title bar?
I have title- “Webnet”
Merging it with a FontAwesome Glyphicon’s icon images as-
<title><i class="icon-user icon-black"></i>Webnet</title>
And I tried it replacing with image source-
<title><img src="assests/img/user-Hermosillo.png" ></img>Webnet</title>
But title shows innerHTML instead of showing image there.
That method will not work. The
<title> only supports plain text. You will need to create an
.ico image with the filename of
favicon.ico and save it into the root folder of your site (where your default page is).
Alternatively, you can save the icon where ever you wish and call it whatever you want, but simply insert the following code into the
<head> section of your HTML and reference your icon:
<link rel="shortcut icon" href="your_image_path_and_name.ico" />
You can use Photoshop (with a plug in) or GIMP (free) to create an
.ico file, or you can just use IcoFX, which is my personal favourite as it is really easy to use and does a great job (you can get an older version of the software for free from download.com).
You can also use a number of online tools to create favicons such as ConvertIcon, which I’ve used successfully. There are other free online tools available now too, which do the same (accessible by a simple Google search), but also generate other icons such as the Windows 8/10 Start Menu icons and iOS App Icons.
Update 2: You can also use
.png images as icons providing IE11 is the only version of IE you need to support. You just need to reference them using the HTML code above. Note that IE10 and older still require
Update 3: You can now use Emoji characters in the title field. On Windows 10, it should generally fall back and use the Segoe UI Emoji font and display nicely, however you’ll need to test and see how other systems support and display your chosen emoji, as not all devices may have the same Emoji available.