Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

Favicon

Description

Favicon, or favorites icon, is a website image.

It displays next to the web address, tabs, and bookmarks.

ICO

Root

/favicon.ico

A link element is not necessary when the favorites icon is in the root directory with the name favicon.ico.

<link href="/mydirectory/myfile.ico" rel="icon">
<link href="/mydirectory/myfile.ico" rel="icon" type="image/x-icon">
<link href="/mydirectory/myfile.ico" rel="icon" type="image/vnd.microsoft.icon">
<link href="/mydirectory/myfile.ico" rel="shortcut icon">
<link href="/mydirectory/myfile.ico" rel="shortcut icon" type="image/x-icon">
<link href="/mydirectory/myfile.ico" rel="shortcut icon" type="image/vnd.microsoft.icon">

GIF

<link href="/mydirectory/myfile.gif" rel="icon">
<link href="/mydirectory/myfile.gif" rel="icon" type="image/gif">

JPG

<link href="/mydirectory/myfile.jpg" rel="icon">
<link href="/mydirectory/myfile.jpg" rel="icon" type="image/jpeg">
<link href="/mydirectory/myfile.jpeg" rel="icon">
<link href="/mydirectory/myfile.jpeg" rel="icon" type="image/jpeg">

PNG

<link href="/mydirectory/myfile.png" rel="icon">
<link href="/mydirectory/myfile.png" rel="icon" type="image/png">

SVG

<link href="/mydirectory/myfile.svg" rel="icon">
<link href="/mydirectory/myfile.svg" rel="icon" type="image/svg+xml">

Example

<!doctype html>
<html>
<head>
    <link href="/mydirectory/myfile.svg" rel="icon">
</head>
</html>

World Wide Web Consortium (W3C)

HomeMenu