网站如何添加图标
出现在地址栏、标签页和书签上的小图标称作favicon,是favorites icon(收藏夹)的简称。
Iphone,ipad等苹果设备的主界面要求更大尺寸的图标,推荐大小为114像素x 114像素。
为网站添加图标的步骤如下:
(1)创建一个16像素x 16像素的图像,保存为ICO或PNG,GIF格式。
(2)为触屏设备创建一个114像素x 114像素的图像,保存为PNG格式。
(3)在HTMLS文档的head部分,输入<link rel二” shortcut icon" href二”favicon. ico"/>,其中favicon. ico。是服务器上图标的名称和位置;如果图像为PNG,则输入<link rel = " icon" type =image/png" href = "favicon"ico"/>;如果图像为GIF,则输入<link rel = "icon" type二”image/gif"
href=”favicon. ico"/>。
(4)在HTML5文档的head部分,输入<link rel = " apple一touch一icon" href = "apple一touch -icon. png"/>。其中apple一touch一icon. png是服务器上图标的名称和位置。
为网站添加图标:
<html>
<head>
<meta charset="utf一8”>
<title>给网站添加图标</title >
<link rel,"shortcut icon" href,"img/favicon.ico"/>
<link rel="apple一touch一icon" href="img/apple一touch一icon.png"/>
</head>
<body>
<img src=”img/ftplogo.png”width=”200”height=”192”alt=”FarmTraining Podcasts Logo"/>
<hl>Welcome!</hi>
<p>Welcome to the<cite>Bread and Breakfast</cite>home page.</p>
</body>
</html>