Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add image in title bar [duplicate]

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.

Any help?

like image 840
Manoz Avatar asked Apr 03 '13 12:04

Manoz


People also ask

How do I put my logo on my website title bar?

To add a favicon to your website, either save your favicon image to the root directory of your webserver, or create a folder in the root directory called images, and save your favicon image in this folder. A common name for a favicon image is "favicon. ico".

How do you add a title bar in HTML?

HTML <title> Tag.


1 Answers

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).

Update 1: 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 .ico files.

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.

like image 199
Samuel MacLachlan Avatar answered Sep 19 '22 22:09

Samuel MacLachlan