HTML/CSS/Form Tags/fieldset

Материал из Web эксперт
Перейти к: навигация, поиск

"fieldset" groups "form" elements by drawing a rectangle

    
<html>
<head>
<title>fieldset element example</title>
</head>
<body>
    <form name="form1" method="post" action="">
    <p>
        <fieldset>
        <input type="text" name="textfield1" value="First text field in first fieldset"size="60">
        <br>
        <input type="text" name="textfield2" value="Second text field in first fieldset"size="50">
        </fieldset>
    </p>
    </form>
    <form name="form2" method="post" action="">
    <p>
        <fieldset>
        <input type="text" name="textfield3" value="First text field in second fieldset"size="65">
        <br>
        <input type="text" name="textfield4" value="Second text field in second fieldset"size="45">
        <br>
        <input type="text" name="textfield5" value="Third text field in second fieldset"size="55">
        </fieldset>
    </p>
    </form>
</body>
</html>



Form field set with legend

<html>
<body>
<html>
<body>
<fieldset>
    <legend>
        Health information:
    </legend>
    <form>
        Height <input type="text" size="3">
        Weight <input type="text" size="3">
    </form>
</fieldset>
</body>
</html>

</body>
</html>