第五讲 html 最后知识点归纳(表单、type类型、按钮以及元素分类)

本文主要归纳了HTML中的表单使用,包括<form>标签的action和method属性,以及<input>元素的各种type类型,如text、placeholder和maxlength等属性。此外,还介绍了不同类型的按钮<button>,如提交和重置按钮。最后,提到了HTML元素的分类。

一、表单总结:

1、表示采集数据范围  <form action="" method=""></form> 

注意:action 数据提交的地址

           method 数据提交的方式:get和post

get

1、get方式提交的数据会出现在地址栏上方,安全性较低

2、get方法可能获取的数据是浏览器里的缓存信息

3、get方式提交数据有长度限制

post

2、<input type=“text” name="" value=”“ placeholder="">

解释:1.name 名称; value 初始值 ;placeholder 输入框里的提醒文本 ;

             maxlength 输入框里字符个数的限制。

          2.给ontion添加selected或者selectde="selected"可以使选项默认

(1)type类型

文件上传框file
<input type="file">
文本输入框text
 <input type="text">
密码输入框password
 <input type="password">
单选框radio
<input type="radio" name=”值一致“>
复选框checkbox
<input type="checkbox“>
提交按钮submit 
<input type="submit" value="提交">
重置按钮reset
<input type="reset" value="重置“>
一般按钮button
<input type="button" value="按钮“>
图片按钮image
<input type="image" src="图片路径“ alt="">

(2).按钮

<button>按钮</button>

<button type="submit">提交按钮</button>

<button type="reset">重置按钮</button>

快记小技巧:1个上传框 2个输入框 2个选中框 4个按钮(1224)

二、元素分类

块元素
display:block

<p></p><h1>
</<h1>~<h6></h6>

<ul></ul>

<ol></ol>

<hr>

<div></div>

<form></form>

行内元素
display:inline

<span></span>

<a href=""></a>
<b></b>
<strong></strong>
<i></i>
<em></em>
<label></label>
<small></small>

行内块元素
display:inline-block
<img src="" alt="">
<iframe src=""></iframe>
<input type="">
<textarea></textarea>
<select></select>
<button></button>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值