0

I am creating a website and i want to add a favicon to the title of the browser. i tried this code but nothing happened.

 <html>
  <link rel = "icon" type = "image/png" href = "/icon.png">
  <head>
    <title></title>

 </head> 
</html>    
  • 5
    Possible duplicate of [Adding a favicon to a static HTML page](https://stackoverflow.com/questions/9943771/adding-a-favicon-to-a-static-html-page) – Alex May 15 '19 at 14:49

2 Answers2

1

Try this, you need to put it inside your head element

<html>
  <head>
    <link rel="icon" type="image/png" href="YOURICONPATH/icon.png">
    <title></title>

 </head>
</html> 
-2
    <link rel="icon" href="http://example.com/favicon.png">

Putting this inside your header section will set up a favicon at the top left of the tab on your website. Make sure to change the example picture to the image of your choice.