在html中,<fieldest>标签是用来将表单内的相关元素分组,相关表单元素周围将会被设置边框;<fieldset> 元素的标题一般由<legend>标签来定义;<fieldset>标签被所有主流浏览器支持。

html5新增属性

disabled:规定该组中的相关表单元素应该被禁用。

form:规定fieldset所属的一个或多个表单。

name:fieldset的名称。

<fieldset>标签支持html全局属性和html事件属性

格式

<form>
<fieldset>
<legend>标题</legend>
表单元素
</fieldset>
</form>

实例

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/hmtl; charset=utf-8" ><!--PHP中午乱码处理-->
<title>html < fieldset>标签_PHP笔记</title>
</head>
<body>
<form>
<fieldset>
<legend>登陆</legend>
用户名: <input type="text"><br>
密码: <input type="password"><br>
Email: <input type="text">
</fieldset>
</form>
</body>
</html>

以上就是html fieldset标签怎么用的详细内容,更多请关注其它相关文章!

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。