在html5 中
设置网页图标的语句
<link rel="icon" type="image/x-icon" href="favicon.ico">
这个语句不一定要加在标题栏下面
但是这个语句要确保没有base的情况下使用
如果有base 那么他解析url的时候会默认在那个网页的目录下寻找 favicon.ico 找不到的话自然就不能作为网站的图标了

<!DOCTYPE html>
<html>
<head>


<link rel="icon" type="image/x-icon" href="favicon.ico">


<meta charset =”UTF-8”> 
<meta name = "keywords" content = "小甲鱼,web开发">
<meta name = "description" content = "《零基础入门学习web开发》"> 
<meta name = "author" content = "小甲鱼">

<meta name = "viewport" content = "width = device-width, initial-scale=1.0">
<title>我自己的路我自己走哈哈哈</title>

</head>
<body>


</body>
</html>

 

相关文章:

  • 2022-01-18
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2021-10-17
  • 2021-08-12
  • 2021-06-18
  • 2022-12-23
猜你喜欢
  • 2021-12-14
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
  • 2021-03-31
  • 2021-09-19
  • 2022-12-23
相关资源
相似解决方案