Jump to content

favicon


CNT

Recommended Posts

<link url("images/favicon.ico") />
Where do I put the favicon in web development? I thought it should be in CSS, correct? Then there's title that goes in every HTML page, not in CSS.
<title>Fun Web Site</title>
Or is it even possible (and suggested?) to put those title (and favicon) in CSS? Could someone provide suggesting codes to help start myself with this?Thank you.ChuckI am aware that in every head on every HTML page requires:
<link rel="stylesheet" href="Stylesheet.css" type="text/css" />
Link to comment
Share on other sites

Where do I put the favicon in web development? I thought it should be in CSS, correct? Then there's title that goes in every HTML page, not in CSS.Or is it even possible (and suggested?) to put those title (and favicon) in CSS? Could someone provide suggesting codes to help start myself with this?
No. There's no way to do these things in css. If there is a file named, "favicon.ico" in your root directory, you don't have to put anything in the <head> of your document. However, if your icon is a different format/extension (or a different name/path of any kind), like png for example, you'll have to explicitly acknowledge your favicon with a link relation:
<link rel="icon" href="favicon.png"/>

I am aware that in every head on every HTML page requires:
An HTML document doesn't necessarily require an external stylesheet or even any styles at all.
Link to comment
Share on other sites

favicons and titles have no interaction with CSS.You might want to Google favicon to get the correct syntax for a favicon link element.An HTML document does not REQUIRE a link to an external stylesheet. External stylesheets are not required at all. You can have no CSS, or you can have an internal stylesheet, as alternatives to an external stylesheet.Reviewing some basics might be a good idea. Have you tried these tutorials?

Link to comment
Share on other sites

An HTML document does not REQUIRE a link to an external stylesheet. External stylesheets are not required at all. You can have no CSS, or you can have an internal stylesheet, as alternatives to an external stylesheet.
This is little OT... I am not sure what you mean that a HTML code page does not need a link to CSS? If I want to use the whole website with same background color and fonts, etc, from CSS, then I will HAVE to link CSS in every HTML code page. I am also aware about "internal CSS" (without link to external). If you're saying that background color and fonts are not needed, then I understand don't link to CSS (or even have a CSS in first place). Is this what you're saying?Now, my question was could I have favicon link in CSS so that I don't have to copy/paste the favicon link in every HTML code page. I never used favicon before, so I was assuming that I would have to use favicon link in the head section of every HTML code page, just like the title, that was my point. So, I thought was it possble to use favicon in CSS (so I can type once and forget it). If not, then it's fine. I am just asking questions... as you can see, I still have the "Newbie" status.Chuck
Link to comment
Share on other sites

This is little OT... I am not sure what you mean that a HTML code page does not need a link to CSS? If I want to use the whole website with same background color and fonts, etc, from CSS, then I will HAVE to link CSS in every HTML code page. I am also aware about "internal CSS" (without link to external). If you're saying that background color and fonts are not needed, then I understand don't link to CSS (or even have a CSS in first place). Is this what you're saying?Now, my question was could I have favicon link in CSS so that I don't have to copy/paste the favicon link in every HTML code page. I never used favicon before, so I was assuming that I would have to use favicon link in the head section of every HTML code page, just like the title, that was my point. So, I thought was it possble to use favicon in CSS (so I can type once and forget it). If not, then it's fine. I am just asking questions... as you can see, I still have the "Newbie" status.Chuck
Perhaps you should have read the responses a little better.They have already answered your questions. :) A stylesheet is not absolutely needed; it's pretty much only there for aesthetics.If you wanted to add the same aesthetic appeal to every web page without much hassle, then yes, an external stylesheet would be optimal.But web pages don't necessarily need to be prettied up in order to function.The favicon, if called favicon.ico and put in the root of your directory, doesn't need to be referenced at all.In the case of most web browsers that support one, it will be automatically noticed and applied.Though if you wanted to reference it just in case for the minority, then you can use this code:
<link rel="shortcut icon" href="/favicon.ico" />

That is recognized by most browsers, but compatibility varies, so google your specific case as Deirdre's Dad suggests.

Link to comment
Share on other sites

every HTML page requires
This is what we wanted you to understand is false. We did not argue against using external style sheets. We said nothing about the advisability of using one sheet for many pages. (Which you also did not mention in your original post.) It was the word "required" that concerned us. We spend a lot of time on this board discussing the difference between requirements, good ideas, and bad ideas. So when a concept like "require" appears in an inappropriate context, we explain.As for the favicon, our answers were short, to the point, and non-judgmental. A huge percentage of questions we answer here are from newbies. Don't worry about that.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...