iframe(它能将另一个HTML页面嵌入当前页面中)
<iframe width=“300” height=“200” src=“//baidu.com” referrerpolicy=“noreferrer” sandbox=“allow-scripts”>
a (超链接)
属性
-
herf
1.网址
2.路径
3.伪协议
javascript:void 0
mailto: xxx@xxx.com
tel: 1312344321
4.锚点
href = “#”
- target
1._blank
新窗⼝加载
2._self
在当前⻚⾯加载, 默认属性
3._patent
在当前⻚⾯框架的⽗级框架加载。如果⽗级不存在就在当前⻚⾯加载
4._top
在当前⻚⾯框架的最顶级框架加载。如果最顶级框架不存在就在当前页⾯加载
- download
1.作用
下载URL⽽不是打开⻚⾯
2.注意
此属性适⽤于同源URL,如果此属性有值,⽤值作为下载⽂件名 - rel=noopener
作用
- 跳转到外部页面
- 跳转到内部锚点
- 跳转到邮箱或电话
img(图片标签)
- 用法
<img src=“/static/a.png” alt=“logo”>
- 属性
alt / width / height / src - 特性
- 是可替换元素
form (表单标签)
form标签
- 用法
<form action=“/login” method=“GET”></form>
- 作用
提交数据到服务器 - 属性
action / method
input标签
- 作用
让⽤户输⼊内容 - 属性
- type属性
text / password / checkbox / radio / hidden / button /
submit / reset / email / file / number / search / tel / date /
time / range / search / url
- 其他
name / autofocus / checked / disabled / value /
placeholder / required / tabindex
其他输入标签
- 标签
- label
<label for=“username”> ⽤户名 </label>
- textarea
<textarea name=“comment”>你好</textarea>
- select-option
<select name=“score”>
<option value=“10”> 10分</option>
<option value=“20”> 20分</option>
</select>