1.HTML 的历史
2.HTML 起手式
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>
- 注意
===>小圆点表示代码未保存,要常按ctrl+s
3.常用的表章节的标签
表义 | 标签 |
---|
标题 | h1~h6 |
章节 | section |
文章 | article |
段落 | p |
头部 | header |
脚部 | footer |
主要内容 | main |
旁支内容 | aside |
划分 | div |
4.全局属性:所有标签都有的属性
属性 | 作用 |
---|
class | 类 |
contenteditable | 可编辑的 |
hidden | 隐藏 |
id | 唯一标识 |
style | 样式 |
tabindex | 被tab访问的优先级,0表示最后访问,-1表示不可被访问 |
title | 标题(被隐藏的大段文字) |
5.常用的内容标签
标签 | 表义 |
---|
ol+li | 有序列表 |
ul+li | 无序列表 |
dl+dt+dd | 描述性列表 |
pre | 保留空格 |
hr | 水平分割线 |
br | 换行 |
a | 链接 |
em | 表示语气上的强调 |
strong | 表示内容本身的重要性 |
code | 代码中的字母等宽 |
q | 引用 |
blockquote | 块级引用 |
6.一些默认设置
white-space: nowrap;
text-overflow : ellipsis;
overflow : hidden
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
*::before,
*::after {
box-sizing: border-box;
}
a {
color: inherit;
text-decoration: none;
}
input,
button {
font-family: inherit;
}
ol,
ul {
list-style: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
border-collapse: collapse;
border-spacing: 0;
<meta name="viewport" content="width=device-width,initial-scale=1,
minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">