There are examples
<form>
<fieldset>
<legend>个人信息:</legend>
姓名: <input type="text"><br>
邮箱: <input type="text"><br>
生日: <input type="text">
</fieldset>
</form> HTML fieldset to set the border and color:
<fieldset style="border-width: 2px; border-color: #990000; width:95%; height:220">
<legend>你好你好</legend>
</fieldset> Put it up and take a look. Then adjust it yourself. . The three borders change the bottom in the middle to Top (upper), Left (left), and Right (right) respectively.
fieldset tag--Group the form
In the form form, we can group and classify the information in the form. For example, in the form of the registration form, we can group the registration information into
Basic information (generally required)
Detailed information (generally optional)
So how can we achieve it better? We can consider adding the following two tags to the form:
Fieldset: Group the form. A form can have multiple fieldsets.
Legend: Describe the content description of each group.
Format:
<fieldset>
<legend>health information</legend>
height: <input type="text"/>
weight: <input type="text"/>
</fieldset> Browser support:
All browsers support the tag.
[Related recommendations]
What are the attributes of the HTML IMG tag? Understand the usage of IMG tag
What is the article tag in HTML5? Where is the article element used in HTML5?