我们使用标签,对HTML表单中的相关数据进行分组。该标签在网页上的相关元素周围创建一个框。 标签在 标签内使用,为组提供标题或为组提供名称。
<fieldse>…..</fieldset>
以下是使用标签在
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="description" content="meta tag in the web document"> <meta name="keywords" content="HTML,CSS"> <meta name="author" content="lokesh"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <form> <fieldset> <legend>Employee Details</legend> Employee Name<br> <input type="text" name="Ename"> <br> Employee ID<br> <input type="text" name="Eid"> <br> Employee Address<br> <input type="text" name="Eid"> <br> </fieldset> </form> </body> </html>
您可以尝试运行以下代码来对HTML表单中的数据进行分组 -
立即学习“前端免费学习笔记(深入)”;
<!DOCTYPE html> <html> <body> <form> <fieldset> <legend>Student Information:</legend> Student Name:<br> <input type="text" name="sname"> <br> Student Subject:<br> <input type="text" name="ssubject"> <br> </fieldset> </form> </body> </html>
以上就是我们如何在HTML表单中对数据进行分组?的详细内容,更多请关注IT视界其它相关文章!
本篇文章给大家分享6个值得一学的...
隐藏html标签的方法:1、通过...
html设置编码utf8的方法:...
html设置字体的方法:1、【f...
本篇文章给大家介绍html隐藏文...
本篇文章给大家介绍html页面实...
ithorizon