I cannot add a favicon
I am working on a website for my discord bot. I haven’t started anything except adding a GIF I know i’ll keep. I tried to find videos, they didn’t work. Anyone who can help, let me know in the comments and i’ll give you perms to edit.
Solution
This is what I do:
<link href="image.png" rel="icon" type="image/png" sizes="16x16">
Hey there! I hope this helps. It's not a favicon, but it works for me:
<link href="something.png" rel="icon" type="image/x-icon" />
If this helps, feel free to mark as right! Have a good one!
@RohilPatel Only put type="image/x-icon"
for Windows ICO files; the type
attribute should be the MIME type of the linked resource. For a PNG image, that would be "image/png".
Well I really didn't care as it did the trick for me @19wintersp
@RohilPatel If you did this:
<bOdY>>
<h1 >Hello, world!
< hEaD>
most modern browsers would accept it, and turn it into this:
<!DOCTYPE html>
<html>
<head></head>
<body>
<h1>Hello, world!</h1>
</body>
</html>
Does that mean that it's alright to code like in the first example?
No, however I use ejs and such in html files. Does that mean I'm not allowed to use ejs in them? @19wintersp
@RohilPatel That has practically nothing to do with what I just said.
@SixBeeps Still, it won’t work.
@NicoSlafter You never actually uploaded a favicon?
@NicoSlafter You uh...
You need to do that in order to set a favicon.
@SixBeeps Thank you for your help, I still wasn’t able to but, it’s all okay.
Favicons
In your
<head>
element:You basically copied my answer smh @tussiez
@RohilPatel Oh, didn't see your answer until now.
Well hopefully it works for you lol @tussiez