html常用标签(form标签)

一、form标签

form标签是html标签中非常重要的一个标签。常用于注册、登录页面的使用。

<form action="提交地址" method="提交方式">

</form>

注:method的值有两个。get(默认值)和post。get数据安全性没有post高。post的速度没有get快。

form常用的元素:

1、文本框

  <input type="text"/>

2、密码框

  <input type="password"/>

3、下拉菜单 

<select name="" multiple="multiple">
    <option value="">请选择省份</option>
    <option value="1">江苏</option>
    <option value="2">河南</option>
    <option value="3">河北</option>

</select>

   注:multiple="multiple" 多选

4、单选按钮

<input type="radio" name="sex" id="male" />
   <label for="male">男</label>
<input type="radio" name="sex" id="female" />
   <label for="female">女</label>

注:checked="checked" 默认选中

5、复选框

<input type="checkbox" value="apple" />苹果
<input type="checkbox" value="banana"/>香蕉
<input type="checkbox" value="pineapple"/>菠萝

6、上传图片

<input type="file" />

7、多行文本框

<textarea cols="20" rows="10" style="resize:none;">
</textarea>

注:cols表示文本框的宽度   rows表示文本框的高度 resize:none;禁止拖动,文本框固定大小。

8、按钮

<input type="reset"/>     重置按钮
<input type="submit"/>   提交按钮
<input type="button" value="普通按钮"/>   普通按钮
<input type= "image" src="image/btn.jpg"/>  图像按钮

注:重置和提交必须在form里面才可以有用

9、<fieldset></fieldset> 控件组标签

 <fieldset>
    <legend>health information</legend>
    height: <input type="text" />
    weight: <input type="text" />
  </fieldset>

10、 网页嵌套 <iframe src="http://www.baidu.com"></iframe>

二、marquee 标签(不常用)

<marquee></marquee>
behavior属性: alternate、scroll、slide,分别表示文字来回滚动、单方向循环滚动、只滚动一次。
direction属性: 属性的参数值有down、left、right、up共四个单一可选值,分别代表滚动方向向下、向左、向右、向上。
hspace和vspace属性: 这两个属性决定滚动矩形区域距周围的空白区域。
scrollamount: 滚动速度。
scrolldelay:滚动停顿的时间。
loop: 表示循环的次数,值是正整数,默认为无限循环。
原文地址:https://www.cnblogs.com/minguofeng/p/4817922.html