Durnehviir
Durnehviir

Reputation: 66

How can I make an icon appear next to my title in the <title> tag?

In my website, I want a small icon next to the title of my webpage. I do mean the one displayed on the tab in Chrome/IE/Firefox.

Upvotes: 1

Views: 3964

Answers (2)

Ajith S
Ajith S

Reputation: 2917

You can do as,

<head>
  <title>This is the title of my website.</title>
  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
</head>

Read this link

If your website doesn't have this icon you will get an error on every visited web page. This favicon.ico must be 16 by 16 pixels. If it's larger or smaller, it will be ignored and it won't be shown. You can create this icon by using a icon editor with an online generator or just by using Photoshop.

Online ico generator

Upvotes: 0

Umang Mehta
Umang Mehta

Reputation: 1497

<link rel="SHORTCUT ICON" href="images/logo1.png" type="image/x-icon">

Note: Generally try to use ico file(recommended). You can use a tool to convert your LOGO to an ico file. There are many available on google.

Upvotes: 1

Related Questions