html – Favicon不工作

前端之家收集整理的这篇文章主要介绍了html – Favicon不工作前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我想要插入到我的网页的我的图标不起作用.有人可以告诉我代码和样式我需要插入吗?
<html>
    <head>
        <title>Welcome to Crash - Login or Signup</title>
        <link rel="stylesheet" type="text/css" href="crash_styling.css"></link>
        <link rel="icon" href="/favicon.ico" type="image/x-icon">
        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">      
    </head> 

    <body  link="#336666" alink="red" vlink="red">

        <div id="header_title">
            <h1 id="title">crash</h1>
            <p id="motto">Keep track of all your assignments and projects.</p>
        </div>  

        <form name="input" action="html_form_action.asp" method="get" id="user_passEntry">
            Username:<input type="text" name="username" placeholder="Your Username" /> <br />
            Password:<input type="password" name="password" placeholder="Your Password" />
            <input type="submit" value="submit">
        </form>

        <p id="description">Crash is a way students can keep track of their projects and assignments on the computer or on their devices. With crash,you can be sure you'll never turn in something late again.</p>

                <div class="make"><a href="crash_styling" style="text-decoration:none"/>Make a New Assignment</div>
                <div class="edit"><a href="crash_styling" style="text-decoration:none"/>Edit an Assignment</div>
                <div class="check"><a href="crash_styling" style="text-decoration:none"/>Check off an Assignment</div>
    </body> 

</html>

解决方法

要在您的网站上放置一个图标,您可以使用< head>标签
<link rel="shortcut icon" href="http://yourwebsitepath/favicon.ico" />

您需要确保图标的路径正确.如果路径不正确,则不会显示.我也看到缓存问题,似乎这个图标不起作用.清除缓存后,始终尝试重新启动浏览器.

原文链接:https://www.f2er.com/html/224467.html

猜你在找的HTML相关文章