0

I'm building a website and i want to add a small icon logo to the title bar of the browser. Where i have to place the code? I tried before the head but nothing happens

Konstantina
  • 3
  • 1
  • 2
  • 1
    Here is a good reference for you [How to add favicon for a website](https://stackoverflow.com/a/35625707/8644764) – sevilturner Apr 16 '19 at 17:23

1 Answers1

3

The logo on title bar is called favicon. To include a favicon in your website you just need to provide the link to your icon inside your tag.

<!DOCTYPE html>
<html>
  <head>
    <title>This is a title</title>
    <link rel = "icon" type = "image/png" href = "/icon.png">
    <!-- For apple devices -->
    <link rel = "apple-touch-icon" type = "image/png" href = "/icon.png"/>
  </head> 
</html>

By using this you can include your icon in the title bar of your website. The extension of your icon should be .png for better visibility and convert your png to .ico extension for more support.

Usman Ali
  • 116
  • 5