HTML创建外部元素,例如标头

时间:2019-03-09 19:49:17

标签: javascript html css

这是我的网站

<!DOCTYPE html>

<html>

  <head>

    <title>gump</title>
    <meta charset="UTF-8">

    <link rel="stylesheet" type="text/css" href="style.css">

  </head>

  <body>

    <div class="header">
    <a><img src="pictures/logo.png" alt="gump" style="height:25px" href="#default" class="logo";></a>
    <div class="header-right">
    <a class="active">Home</a>
    <a href="links">Links</a>
    <a href="e">Encryption</a>
    </div>
    </div>

    <div style="padding:25px">
    <table style="width:100%; table-layout:fixed">
        <tr>
        <td style="font-weight:bold">Sites</td>
        <td style="font-weight:bold">Partners</td>
        <td style="font-weight:bold">Social Media</td>
        <td style="font-weight:bold">Tools</td>
        <td style="font-weight:bold">Links</td>
        </tr>
        <tr>
        <td><a href="https://www.gumprecht.co.at">Home</a></td>
        <td><a href="https://www.pherbich.com">pherbich.com</a></td>
        <td><a href="https://steamcommunity.com/id/gump2826">Steam</a></td>
        <td><a href="https://www.byom.de/">byom.de</a></td>
        <td><a href="https://www.gumprecht.co.at/">gumprecht.co.at</a></td>
        </tr>
    </table>
    </div>

  <script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script></body>

</html>

那只是页眉和页脚太多了,我想将页眉和页脚外部放在外部html上,但是如何在index.html中获取外部header.html和footer.html < / p>

1 个答案:

答案 0 :(得分:0)

我最近在寻找相同的主题,本文介绍了如何实现。 Link to the Atricle