HTML常见元素

HTML常见元素

<meta charset="utf-8"> 

char:字符 set:集合
charset:使用的字符集

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale-1.0, user-scalable=no">

viewport:视口

<base href="/"

基础路径

<a href="http://www.taobao.com" target="_blank">淘宝网</a>

target="_blank" :新窗口,新标签

<td colspan="2" rowspan="2">1</td>

colspan:占据行数 rowspan:占据列数

<form method="GET" action="http://www.qq.com">

用GET方法提交到aciton中

<option value="2" selected>二</option>

下拉框 selected:默认被选中

<input type="text" name="text1" />
<input type="password" name="password" />

type类型 text:文本 password:密码,不被看见

<input type="radio" name="radio1" id="radio1-1" />
<label>选项一</label>
<input type="radio" name="radio1" id="radio1-2" />
<label for="radio1-2">选项二</label>

type:radio,单选框
name相同的单选框只能选一个
label:标签,for="radio1-2"使点击标签也能选中 id=“radio1-2”

<button type="button">普通按钮</button>
<button type="submit">提交按钮</button>
<input type="submit" value="提交按钮二" />
<button type="reset">重置按钮</button>

type=“button”:无任何功能
type=“submit”:提交到action中url,在表单form中才有意义
type="reset“:重置表单
用input,type="sumbit"和button功能一样,也是在表单中才有意义,注意value

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值