Featured image of post BS-实验一为叮叮书店添加元信息

BS-实验一为叮叮书店添加元信息

BS-实验一为叮叮书店添加元信息

本库包含作业答案,请确保阅读并完全同意重要声明

访问代码仓库

创建项目

  1. VScode 创建并打开文件夹bookstore
  2. bookstore下创建index.html

创建网页代码

  1. index.html内创建如下代码:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>叮叮书店</title>
</head>
<body>
    
</body>
</html>

为“叮叮书店”项目首页添加头部信息

  1. index.html中添加如下代码片段:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>叮叮书店</title>
+    <meta name="keywords" content="网上书店,计算机,前端技术">
+    <meta name="description" content="叮叮书店是销售信息技术及相关图书的垂直网站">
+    <meta name="robots" content="index,follow">
+    <link rel="icon" herf="image/favicon.ico">
</head>
<body>
    
</body>
</html>
  1. 添加网页图标,在bookstore下添加image,在image下添加适合的favicon.ico
使用 Hugo 构建
主题 StackJimmy 设计