页面结构
<!DOCTYPE html> <!--文档类型 -->
<html>
<!-- 标题 基本配置 -->
<head>
<title>hello</title>
<meta charset="UTF-8">
</head>
<!-- 页面中展示的内容 -->
<body>
<h2>内容</h2>
</body>
</html>
常见的标签
文本修饰
- 加粗 b/strong
- 斜体 i/em/cite
- 滚动标签 marquee 属性:direction方向,scrollamount速度,loop轮询次数
- font字体标签
- 上标sup,下标sub
格式修饰
- 标题标签 h1-6
- 段落标签 p
- 换行 br
- 分割线 hr
- 列表标签
无序:ul li li ul
有序:ol li li ol
多媒体标签
- 图片标签 img
- 视频标签 video
- 音频标签 audio
超链接标签
- a href=" "
表格标签
- 表格标签
table 表格
tr 行
td 列
rowspan 合并行
colspan 和并列
表单标签
- form 表单
属性:action 提交路径 method 提交方式
get 将数据拼接到url 后面
不安全 2kb数据量小 速度快
post 没有拼接到url 后面 请求头
相对安全 没有限制 相对慢
标签:
input 输入框
type
text 文本内容
password 密文内容
radio 单选按钮
checkbox 多选按钮
submit 提交表单
button 按钮 没有提交功能
reset 重置内容
name 提交数据到后台的key
value 默认值
placeholder 提示信息
select 下拉框
option 子列表
textarea 文本域
rows 宽
cols 高
button 按钮 有提交功能
框架标签
- 作用:本页面中通过多个窗口加载一组框架集,每一个页面都是独立的iframe,frameset
<!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>
<frameset rows="10%,*" noresize frameborder="0">
<frame src="https://www.baidu.com"></frame>
<frameset cols="15%,*" frameborder="0" >
<frame src="https://news.163.com"></frame>
<frame src="https://www.bilibili.com"></frame>
</frameset>
</frameset>
</html>