fieldset标签,html5新增表单标签

亲自体验的代码:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-`1width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <form>
        <fieldset>
            <legend>球类</legend>
            <input type="radio" name="r" id="r1">
            <label for="r1">足球</label>
            <input type="radio" name="r" id="r2">
            <label for="r2">篮球</label>
            <input type="radio" name="r" id="r3">
            <label for="r3">乒乓球</label>
        </fieldset>

        <fieldset>
            <legend>地域</legend>
            <input type="radio" name="d" id="d1">
            <label for="d1">北京</label>
            <input type="radio" name="d" id="d2">
            <label for="d2">杭州</label>
            <input type="radio" name="d" id="d3">
            <label for="d3">广州</label>
        </fieldset>
    </form>

</body>

</html>

 

版权声明:本文为weixin_43158701原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_43158701/article/details/100848588