html 给页面添加icon

前端开发   发布日期:2025年05月01日   浏览次数:191

添加的图标会显示在标题左边,收藏页面时也会存在

方法:

在<head></head>内添加link标签。设置rel为icon。href指定图片url,type指定icon类型

如,与html同目录下有img文件夹,里面包含了google-icon.png

  1. <link rel="icon" type="image/png" href="img/google-icon.png"/>

 

http://www.w3.org/2005/10/howto-favicon

以上就是html 给页面添加icon的详细内容,更多关于html 给页面添加icon的资料请关注九品源码其它相关文章!