Adding a favicon to a static HTML page
You can make a .png image and then use one of the following snippets between the <head>
tags of your static HTML documents:
<link rel="icon" type="image/png" href="/favicon.png"/>
<link rel="icon" type="image/png" href="https://example.com/favicon.png"/>
Add Favicon to Website
Simply put a file named favicon.ico
in the webroot.
If you want to know more, please start reading:
- Favicon on Wikipedia
- Favicon Generator
- How to add a Favicon by W3C (from 2005 though)
How to add a favicon to a static webpage made using parcel.js?
At your <head>
tag at your html file you can use
<link rel="shortcut icon" href="favicon.ico" />
Favicon for static HTML page
You just create a favicon.ico with your logo or image and upload it to the folder where your index.html (or your default page).
You can easily create favicon (favicon.ico) from this online tools
http://tools.dynamicdrive.com/favicon/
I've used this to generate favicon for my website.
For eg: For my website (mansoor.in) I've uploaded favicon.ico here.
Adding a favicon to website through HTML code
Your Favicon path uses a windows style File path as pointed out in the comments.
Ensure the following
- favicon1.ico file is present in the package that you are transferring onto the server.
- Ensure that the file is accessible over http (try using a browser to navigate to it). The path should be something like http://server:port/app-uri/favicon1.ico
- After that as suggested in one of the comments use a relative path such as ./favicon1.ico in the HTML source.
Also I suggest reading up on the concept of favicon http://www.w3.org/2005/10/howto-favicon
Related Topics
Is It Necessary to Write Head, Body and HTML Tags
Difference Between HTML Div and Span Elements
Float:Left; VS Display:Inline; VS Display:Inline-Block; VS Display:Table-Cell;
How to Keep Origin in Center of Image in Scale Animation
How to Have Multiple ≪Tbody≫ in Same ≪Table≫
A Space Between Inline-Block List Items
Set the Table Column Width Constant Regardless of the Amount of Text in Its Cells
Should I Put Input Elements Inside a Label Element
How to Create Download Link in Html
Are There Any Style Options For the Html5 Date Picker
Nesting Block Level Elements Inside the ≪P≫ Tag... Right or Wrong
Is There a Minlength Validation Attribute in Html5