HTML标题图像 [英] HTML Title Image

查看:129
本文介绍了HTML标题图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在HTML页面的标题上有一个图像(即标题和标题一起)。我该怎么做?

I want to have an image on the title in an HTML page (i.e on the tab along with the title). How can I do that?

推荐答案

你需要的是一个favicon.ico文件。
只需将其放入网站的根目录中,并链接到您网页的标题即可。

What you need is a favicon.ico file. Just put it in the root of your site and link to it in the header of your page

<head>
    <title>My Site</title>
    <link rel="shortcut icon" href="favicon.ico" />
</head>

你应该把它放在你网站的根目录并命名为favicon.ico,因为有些浏览器寻找即使你没有链接到你的网页上。

You should put it in the root of your site and name it favicon.ico because some browsers look for it even if you don't link to it on your pages.

这篇关于HTML标题图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆