html - 将网站图标添加到网站

标签 html favicon

<分区>

Possible Duplicate:
HTML Title Image

谁能告诉我如何在 PHP 中使图标出现在浏览器选项卡上?

我希望我的图标在访问我的网站时显示在选项卡上。

最佳答案

  1. 这不是用 PHP 完成的。它是 <head> 的一部分HTML 页面中的标记。
  2. 该图标称为网站图标。根据维基百科:

    A favicon (short for favorites icon), also known as a shortcut icon, website icon, URL icon, or bookmark icon is a 16×16 or 32×32 pixel square icon associated with a particular website or webpage.

  3. 添加它很容易。只需添加 .ico 16x16 像素或 32x32 像素的图像文件。然后,在网页中,添加 <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"><head>元素。
  4. 您可以轻松生成网站图标 here .

关于html - 将网站图标添加到网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11893478/

相关文章:

javascript - 纯 JavaScript : Remove Element when it's child is clicked

html - 如何为网站添加浏览器标签图标(favicon)?

playframework - Play Framework 图标问题

ruby-on-rails - favicon the rails way

html - Favicon 有时不显示

javascript - 寻找方法来检查包含某个单词的字符串

javascript - 宽度为 100% 的可扩展/可收缩列

html - col 类的 Bootstrap 问题

url - .url 文件不加载图标

javascript - 包括 HTML 页面和样式吗?