标题标签 h1~h6
h1~h6 语义越来越轻
页面上只有一个h1标签
段落标题 p
一段一段文字的时候使用
<h3>金缕衣<h3>
<p>劝君莫惜金缕衣</p>
<p>劝君惜取少年时</p>
<p>花开堪折直须折</p>
<p>莫待无花空折枝</p>
链接标签 a
页面间的跳转
<a href="http://www.baidu.com" title="我想去百度" target="_self">百度</a>
href:目的地,跳转后的URL地址
title:鼠标悬停时显示的内容
target:设置跳转的方式
_self:在当前页面中打开;(默认值)
_blank:在新的页面中打开
页面内的跳转
<a href="#">回到顶部</a>
可以设置id实现上下跳转
图片标签
<img src="./img/x.jpg" alt="图片加载失败">
src:设置显示的目标图片
alt:当图片加载失败的时候,显示的内容
当图片在同一目录下(./)可以省略
列表标签
有序列表 ol
<ol type="A" start="4">
<li>起</li>
<li>承</li>
<li>转</li>
<li>合</li>
</ol>
type:计数方式:A-Z,a-z,1-2-3-4,I、II、III、IV
start:开始的序数
无序列表 ul
<ul type="square">
<li>起</li>
<li>承</li>
<li>转</li>
<li>合</li>
</ul>
①每一个项目前有一些符号。
②可以通过type属性设置符号的类型(方块square、圆circle)
自定义列表 dl
<dl>
<dt>shio</dt>
<dd>盐味</dd>
<dt>aqua</dt>
<dd>水</dd>
</dl>
自定义列表是项目及注释的组合。
自定义列表项以<dt>
开始。
自定义列表项的定义以<dd>
开始
表单标签
表单
什么是表单:手机用户编写的信息并将其信息提交给后台服务器
就是将速度丢给后台
你的后台在哪里: URL地址 =>action
提交的方式: get/post =>method
<form action="#" method="get">
<form>
文本输入框 text
文本:<input type="text" name="name">
密码框 password
<input type="password" name="pwd">
label
<label for="pwd">密码:</label>
<input id="pwd" type="password" name="pwd">
提交 submit
<input type="submit" value="提交按钮">
普通按钮 button
<input type="button" value="我是按钮">
重置按钮 reset
<input type="reset" value="重置按钮">
单选按钮 radio
是/否?
<input type="radio" name="select">是
<input type="radio" name="select">否
多选按钮(复选框) checkbox
爱好:
<input type="checkbox" name="hobby">运动
<input type="checkbox" name="hobby">学习
<input type="checkbox" name="hobby">游戏
下拉列表 select
地址:
<select name="addr">
<option>南昌</option>
<option>九江</option>
<option>宜春</option>
<option>萍乡</option>
<option>赣州</option>
</select>
文件选择 file
头像:<input type="file">
button 按钮
<input type="button" value="input按钮"><br>
<button>button按钮<img src="img/x.jpg" alt=""></button>
button标签的按钮,按钮上内容可以是任意内容(图片,文字)
Input标签的按钮,按钮的内容只能是文字
隐藏域 hidden
<input type="hidden" name="id" value="1234567">
这个标签是隐藏的,看不到;
name属性定义隐藏域的名称,要保证数据的准确采集,必须定义一个独一无二的名称。