How to insert a logo with an HTML page title?

As stackoverflow.com has a logo with its name, how can this be done for any regular site? What code is needed for this?

+6
source share
5 answers

Do you mean favicon ?

Download 16x16px ico to your website and link it in the head section.

 <link rel="shortcut icon" href="/favicon.ico" /> 

There are many sites that help convert images to the .ico format. This is only the first I've seen on Google. http://www.favicon.cc/

+14
source
+1
source

Yes, you're right, and I just want to make it understandable for beginners.

  • Create the favicon.ico file that you want to display next to your URL in the browser. You can do it online. I used http://www.prodraw.net/favicon/generator.php , which worked fine.
  • Save the created ico file in the root directory / images of your website (your website / images) as favicon.ico.
  • Copy this tag <link rel="shortcut icon" href="images/favicon.ico" /> and pass by it without any changes between the <head> opening and </head> closing tags. I usually place it above the <title> . But that is not the rule.
  • Save the changes to your html file and restart your browser.
+1
source

It is called an icon. It is inserted like this:

 <link rel="shortcut icon" href="favicon.ico" /> 
0
source

Put this in the <head> section:

 <link rel="icon" href="http://www.domain.com/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="http://www.domain.com/favicon.ico" type="image/x-icon" /> 

Save the image file with the name "favicon.ico". You will need to watch online to get the .ico file generator.

0
source

Source: https://habr.com/ru/post/916291/


All Articles