1 Star 0 Fork 1

小弟调调 / html-tutorial

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
footer.md 1.70 KB
一键复制 编辑 原始数据 按行查看 历史
小弟调调 提交于 2022-04-30 01:50 . doc: add tag document.

HTML <footer> 标签

示例

文档中的页脚部分:

<footer>
  <p>Author: Hello World</p>
  <p><a href="mailto:hello@example.com">hello@example.com</a></p>
</footer>

定义和用法

<footer> 标签定义文档或部分的页脚。

<footer> 元素通常包含:

  • 作者信息
  • 版权信息
  • 联系信息
  • 网站地图
  • 返回顶部链接
  • 相关文件

您可以在一个文档中包含多个 <footer> 元素。

提示和注意事项

提示: <footer> 元素内的联系信息应放在 <address> 标记内。

浏览器支持

表中的数字指定了完全支持该元素的第一个浏览器版本。

Element chrome edge firefox safari opera
<footer> 5.0 9.0 4.0 5.0 11.1

全局属性

<footer> 标签支持 HTML 中的全局属性

事件属性

<footer> 标签支持 HTML 中的事件属性

更多示例

使用 CSS 设置 <footer> 样式:

<html>
<head>
  <style>
    footer {
      text-align: center;
      padding: 3px;
      background-color: DarkSalmon;
      color: white;
    }
  </style>
</head>
<body>
  <footer>
    <p>Author: Hello World<br>
    <a href="mailto:hello@example.com">hello@example.com</a></p>
  </footer>
</body>
</html>

默认 CSS 设置

大多数浏览器将显示具有以下默认值的 <footer> 元素:

footer {
  display: block;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jaywcjlove/html-tutorial.git
git@gitee.com:jaywcjlove/html-tutorial.git
jaywcjlove
html-tutorial
html-tutorial
main

搜索帮助