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>

 

原文链接:加载失败,请重新获取