一、连接标签
链接标签
(1)定义:从一个网页指向另一个网页的目的地,这个目标可以是一个网页,也可以是相同上的位置,还可以是图片,一个文件,一个应用程序等;
(2)四种类型:
a.新连接覆盖原连接
b、新开一个窗口
c、图片连接
d、死链接
(3)链接用a标签
案例:
<!--<a href="https://www.baidu.com/">百度</a>-->
新连接覆盖原连接
案例2:
target="_blank"
<a href="https://www.baidu.com/" target="_blank">百度</a>

详解:
target=属性
(1) target=“_blank” 表示将连接的画面内容,在新的浏览器窗口中打开;(打开新窗口)重点
(2)target=“_self” 表示将连接画面内容,显示在目前的窗口中;
(3)target=“_top” 表示将连接画面内容,显示在没有框架的视窗中;
(4)target=“_parent” 表示将连接画面内容,当成文件的上一个画面;
(5)target=“_search” 表示将连接画面内容,搜索区装载的文档
案例3:
图片连接

案例4:
通过#


二、列表
列表标签
1、有序列表
ol 表示有序列表 (order lists 简称ol)
修改排序内容:a,A,1、i、I

2、无序列表
ul 表示无序: (unordered lists 简写:ul)
无序类型:
(1)circle 空心圆点
(2)disc 实心圆点 (默认实心点)
(3)square实心方块

3、快速生无序列表
案例:ul*2>li*3'


四、table 表格
表格: table
(1)认识表中的一些常用单词
border 边距
align 格式 ‘ center’ 对齐
cellspacing 单元格与单元格的距离
cellpadding 单元格与内容的距离
wedth 宽度
height 高度
tr 表示:行
th 表示:表头
td :表示列
(1)输入table键 将所有表格字段显示

(2)rowspan="表格上行数"

(3)colspan合并里列
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>表格</title> </head> <body> <table border="10" cellspacing="" cellpadding="" width="500" height="500" align="center" > <tr> <th>id</th> <th>name</th> <th>class</th> </tr> <tr><td>1</td> <td>zs</td> <td x1>01</td> </tr> <tr><td>2</td> <td colspan="2">ls</td> </tr> </table> </body> </html>

五、表单
表单:
表单标签格式:form
action:开始网址
method:get和post等等
表单标签:主要用来收集用户输入信息如:登入、注册、搜索商品等
用户名格式:text (明文)
密码格式:password (密文)
性别:radio 性别格式 性别是单选,单选类型是radio,注意name要加上sex
复选框:checkbox
文本框:textarea
上传文件:file
下拉选择框:select
button:按钮
reset:重置
submit:提交
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>表单</title>
</head>
<body>
<form action="https://www.baidu.com/" method="post">
<p>用户名:<input type="text" /></p>
<p>密码:<input type="password" /></p>
<p>性别:
<input type="radio" name="sex" id="" value="" />男
<input type="radio" name="sex" id="" value="" />女
</p>
<p>多选框:
<input type="checkbox" name="" id="" value="" />linux
<input type="checkbox" name="" id="" value="" />python
<input type="checkbox" name="" id="" value="" />msyql
<input type="checkbox" name="" id="" value="" />html
</p>
<p>
下拉框
<select name="">
<option value="">本科</option>
<option value="">专科</option>
<option value="">高中</option>
<option value="">小学</option>
</select>
</p>
<p>
自我介绍:<br />
<textarea name="" rows="20 cols="20"></textarea>
</p>
<p>
<input type="file" id="" value="" />
</p>
<input type="submit" value="提交"/>
<input type="reset" value="重置"/>
<input type="button" name="" id="" value="按钮" />
</form>
</body>
</html>
浙公网安备 33010602011771号