Can't get shortcut icon on title tab to show - html

I understand and have seen all the tutorials and stack questions about this but for some reason mine is not showing up!! im using ngrok to test this.
My image is in the assets/images/hello.ico directory. I dont think im inputting the path right. Im trying to use the hello.ico for my tab title.
<head>
<title> ScribeOwl</title>
<link rel="shortcut icon" href="/images/hello.ico"/>
</head>
What is the correct way to fill in the path if my image is in assets/images folder? thank you! Could turbolinks or anything else effect why this isnt working?

are you using erb? try this
<link rel="shortcut icon" href="<%= image_url('hello.ico') %>"/>
or just try with favicon_link_tag replacing your line with this
<%= favicon_link_tag 'hello.ico' %>

Try this
<link rel="icon" href="./assets/images/hello.ico?v=2" type="image/x-icon">

Related

the image does not appear even though the directory is correct laravel 8

i tried to put my website's logo but however it's not appears. note: i already reload many times, and change the browser.
<link rel="icon" href="/img/logo-brebes.png">
<title>SIADU APP</title>
file directory :
public->img->logo-brebes.png
Thank you if there anyone can help me with this problem, I really appreciate it.
Try to do something like this,
<link rel="icon" href="{{asset('img/logo-brebes.png'}}">
Or
<link rel="icon" href="{{public_path('img/logo-brebes.png'}}">
Remember to always check the documentation: https://laravel.com/docs/9.x/helpers#method-public-path
You're probably doing it the wrong way. Try doing it this way
<link rel="icon" href="{{asset('img/logo-brebes.png')}}">

Is there a way to use directories in html?

I am trying to write a simple HTML page and I want to put my css and my favicon in another folder, put this does not work.
<link rel="shortcut icon" type="image/x-icon" href="../other/home.ico" />
<link rel=stylesheet href="../other/home.css" />
when I use this code, it doesnt find the right file even though i think it is the right way to write it.
my HTML file is in the folder: (E:\website\transendence) while my css and favicon is in: (E:\website\other)

how to add an image to the website's title in html

<head>
<title><!--i want to add a picture into the title--></title>
</head>
plz help me guys I'm creating a website only using html. I want to know how to add a picture into the title which is shown in the browser
Title is used to display the page title as text.
You should use the balise below to display an icon named logo.png for example:
<link rel="icon" type="image/png" href="logo.png" />
You actually need to add a favicon to a website.
<link rel="icon">
Simply add the following code to the <head> element:
<link rel="icon" href="http://example.com/favicon.png">
What you're looking to add is actually a called a favicon. It is a tiny image you'd like to add next to the title of your website.
See this article for more info on favicons: https://www.abeautifulsite.net/what-are-favicons.
Some things to consider (taken from the article)
The most common sizes for favicons are:
32x32
48x48
64x64
-128x128
You can use a favicon generator to turn your image into the proper format and download it.
Insert the following code into your head after downloading your favicons and placing them in the directory of your html website.
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
Make sure you use an icon file with sizes as mentioned by #Joshua. Insert the following code.
<link rel="icon" href="....logo.ico?v=2" />
You will need to add ?v=2 query string to force a refresh. Otherwise you might have cache issues.

How can I add a tab icon?

I've tried adding a tab icon to my webpage, I've looked at other pages, but couldn't get any answers why my icon wasn't working. I'm new to coding so please make your answers simple.
Here is my code:
<head>
<link rel="icon" type="image/x-icon" href=favicon.ico>
</head>
add the following inside the <head> tag
<link rel="icon" href="/path/to/favicon/favicon.ico">
and make sure that the favicon.ico is present in /path/to/favicon/

Why is my icon for browser tab not showing up?

I want to make a favicon for my web page. I found a sample but it's not working for me. Can someone please help me get it to work. On the index page of the web site I put this in the of the page.
<!--
<![if !IE>
<link rel="icon" href="http://mywebsiteurl/images/favicon.ico" type="image/x-icon" />
<![endif]>
<link rel="shortcut icon" href="http://mywebsiteurl/images/favicon.ico" type="image/ico" />
!-->
Can I put this on specific pages that I want to display the favicon or does it have to be somewhere at the root of the site?
If you can think of any solution I would really appreciate it. Thanks for any help!
Try this, your comment end was in the wrong place
<!--
<![if !IE>
<link rel="icon" href="http://mywebsiteurl/images/favicon.ico" type="image/x-icon" />
<![endif]>
!-->
<link rel="shortcut icon" href="http://mywebsiteurl/images/favicon.ico" type="image/ico" />
Assuming you are using IE conditional comments for a reason, it looks like your comment syntax is off. You can read more about them here.
Otherwise, the conditional comments aren't specifically needed for a favicon; your first tag looks good to me.
<link rel="icon" href="favicon.ico" type="image/x-icon" />
Yes, you can use unique favicons for individual pages, but browsers go cache crazy and will usually show the most recent icon for that domain unless otherwise instructed. For example: if you set an icon on your home page, but then didn't set one on a subpage, it would likely keep the home page's icon.