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.