My favicon that I am trying to insert into my webpage is not working. Can someone tell me the code and styling I need to insert it?
<html>
<head>
<title>Welcome to Crash - Login or Signup</title>
<link rel="stylesheet" type="text/css" href="crash_styling.css"></link>
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
</head>
<body link="#336666" alink="red" vlink="red">
<div id="header_title">
<h1 id="title">crash</h1>
<p id="motto">Keep track of all your assignments and projects.</p>
</div>
<form name="input" action="html_form_action.asp" method="get" id="user_passEntry">
Username:<input type="text" name="username" placeholder="Your Username" /> <br />
Password:<input type="password" name="password" placeholder="Your Password" />
<input type="submit" value="submit">
</form>
<p id="description">Crash is a way students can keep track of their projects and assignments on the computer or on their devices. With crash, you can be sure you'll never turn in something late again.</p>
<div class="make"><a href="crash_styling" style="text-decoration:none"/>Make a New Assignment</div>
<div class="edit"><a href="crash_styling" style="text-decoration:none"/>Edit an Assignment</div>
<div class="check"><a href="crash_styling" style="text-decoration:none"/>Check off an Assignment</div>
</body>
</html>
When you add a favicon to your site, it may not show up since your browser has 'saved' your site as one without a favicon. You need to clear the cache in your browser or use a different browser.
To add a favicon to your website, either save your favicon image to the root directory of your webserver, or create a folder in the root directory called images, and save your favicon image in this folder. A common name for a favicon image is "favicon.ico".
You will have to delete your cache from your browser, close your browser and reopen it. That should fix it. I don't believe your favicons will get refreshed on your favorites until you revisit that page, and assuming that you had previously cleared your browsers cache.
To place a Favicon on your site you would use the following in the <head>
tag
<link rel="shortcut icon" href="http://yourwebsitepath/favicon.ico" />
You need to be sure that the path is correct for the icon. If the path is not correct it will not appear. I have also seen caching issues that makes it seem that the icon isn't working. Always try to restart your browser after clearing the cache.
Sometimes forced reload fixes the problem. You need to reload the browser's caché memory.
Other combinations can be found in the above provided link.
Most likely you have a bad path to your icon. Confirm your file path. Try to use
href="favicon.ico"
instead of
href="/favicon.ico"
maybe it will work. Or if you have icon in some folder for example in images
href="images/favicon.ico"
You doing it right but if you will have bad path, icon won't appear.
So your CSS
works and if your icon is on same level like CSS
file so remove /
and it should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With