学习 HTML 基础时的笔记
网页基本结构
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
</body>
</html>
head
meta
设置网页元数据
charset
: 指定网页的编码方式
<meta charset="utf-8">
name
: 元数据名content
: 元数据值
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="HTML 学习笔记">
<meta name="keywords" content="HTML,笔记">
<meta name="author" content="OriLight">
<meta name="referrer" content="no-referrer">
http-equiv
: HTTP 回应的头信息字段content
: 字段内容
<meta http-equiv="Content-Type" content="Type=text/html; charset=utf-8">
<meta http-equiv="refresh" content="0;URL='https://orilight.top'">
link
连接外部样式表
title
设置网页标题
<title>网页标题</title>
style
内嵌样式表
script
引入脚本
noscript
不支持脚本时显示的内容
base
指定网页内部相对 URL 的计算基准
href
: 基准网址target
: 链接打开方式
<base href="https://orilight.top/assets/" target="_blank">
属性
施工中