An infrequently used HTML tag fieldset, but I think it's more interesting, and its syntax is as follows:
<fieldset> <legend>fieldset name </legend> <!--join your content-</fieldset>
Here is a code example:
<center> <fieldset style= "width:300px" > <legend> user Login </legend> <form method= "POST" > Account: <input ></input> <br><br> Password: <input type= "password" ></input> <br><br > <input type= "Submit" value= "Login" ></input> <input type= "reset" value= "refill" ></input> </form> </fieldset> </center>
The actual effect of the code is as follows:
User Login Account:
Password:
fieldset Tags--grouping the forms
- This label is paired up to
<fieldset>
start to </fieldset>
end
- A single form can have multiple
<fieldset>
, each pair<fieldset>
For a group, the content description for each group can be used<legend>
Description<form
action
=
"http://www.dreamdu.com/dreamdu.php"
method
=
"post"
enctype
=
"multipart/form-data"
id
=
"dreamduform"
>
<fieldset>
<legend>
User name and password:</legend>
<input
name
=
"hiddenField"
type
=
"hidden"
value
=
"hiddenvalue"
/>
<label
for
=
"username"
>
User name:</label>
<input
type
=
"text"
id
=
"username"
value
=
"www.dreamdu.com"
/>
<label
for
=
"pass"
>
Password:</label>
<input
type
=
"password"
id
=
"pass"
/>
</fieldset>
<fieldset>
<legend>
Gender:</legend>
<label
for
=
"boy"
>
Man</label>
<input
type
=
"radio"
value
=
"1"
id
=
"sex"
/>
<label
for
=
"girl"
>
Woman</label>
<input
type
=
"radio"
value
=
"2"
id
=
"sex"
/>
<label
for
=
"sex"
>
Confidential</label>
<input
type
=
"radio"
value
=
"3"
id
=
"sex"
/>
</fieldset>
<fieldset>
<legend>
My favorite:</legend>
<label
for
=
"computer"
>
Computer</label>
<input
type
=
"checkbox"
value
=
"1"
id
=
"fav"
/>
<label
for
=
"trval"
>
Tourism</label>
<input
type
=
"checkbox"
value
=
"2"
id
=
"fav"
/>
<label
for
=
"buy"
>
Shopping</label>
<input
type
=
"checkbox"
value
=
"3"
id
=
"fav"
/>
</fieldset>
<fieldset>
<legend>
Views on the Dream capital:</legend>
<label
for
=
"select"
>
How you feel about the dream capital.</label>
<select
size
=
"1"
id
=
"select"
>
<option>
Very comprehensive, very good</option>
<option>
In general, but also to strive to</option>
<option>
There are a lot of questions, but you can</option>
</select>
</fieldset>
<fieldset>
<legend>
Dream Capital Programming Language selection:</legend>
<label
for
=
"multipleselect"
>
Programming languages you want to learn in the dream capital</label>
<select
size
=
"10"
multiple
=
"multiple"
id
=
"multipleselect"
>
<option>
Xhtml</option>
<option>
Css</option>
<option>
Javascript</option>
<option>
Xml</option>
<option>
Php</option>
<option>
C#</option>
<option>
Java</option>
<option>
C++</option>
<option>
Perl</option>
</select>
</fieldset>
<fieldset>
<legend>
I want to learn in the dream capital:</legend>
<label
for
=
"WebDesign"
>
Choose the one you want to learn most in the dream.</label>
<select
id
=
"WebDesign"
>
<optgroup
label
=
"client"
>
<option
value
=
"HTML"
>
Html</option>
<option
value
=
"CSS"
>
Css</option>
<option
value
=
"javascript"
>
Javascript</option>
</optgroup>
<optgroup
label
=
"server"
>
<option
value
=
"PHP"
>
Php</option>
<option
value
=
"ASP"
>
Asp</option>
<option
value
=
"JSP"
>
Jsp</option>
</optgroup>
<optgroup
label
=
"database"
>
<option
value
=
"Access"
>
Access</option>
<option
value
=
"MySQL"
>
Mysql</option>
<option
value
=
"SQLServer"
>
Sql server</option>
</optgroup>
</select>
</fieldset>
<fieldset>
<legend>
Personalization Information:</legend>
<label
for
=
"myimage"
>
Personalized Photo Upload</label>
<input
type
=
"file"
id
=
"myimage"
size
=
"35"
maxlength
=
"255"
/>
<label
for
=
"contactus"
>
Contact Us</label>
<textarea
cols
=
"50"
rows
=
"10"
id
=
"contactus"
>
Dreamer dreamdu[at]163[dot]com</textarea>
</fieldset>
<fieldset>
<legend>
Submit:</legend>
<input
type
=
"submit"
value
=
"submit"
id
=
"submit"
/>
<input
type
=
"reset"
value
=
"reset"
id
=
"reset"
/>
</fieldset>
</form>
Here is the result of the above code:
user name and password : User name: Password: Gender: confidentiality of men and women My favorite: computer tourism Shopping The opinion of the Dream Capital: You feel very comprehensive to the dream of the capital, very good general like it, but also to try to have a lot of problems, but also can Dream Capital Programming language selection: you want to learn the programming language in the Dream Capital XHTML CSS JAVASCRIPT XML PHP C # JAVA C + + PERL I want to learn in dream: Choose a HTML CSS javascript PHP ASP JSP Access MySQL SQL Server that you want to learn most in your dream Personalization Information: personalized photo Upload contact Us Dreamer dreamdu[at]163[dot]com Submit:
Style One The code is as follows: <fieldset style= "width:300;height:150;border:2px Groove" align=center></fieldset> Style Two The code is as follows: <fieldset style= "width:300;height:150;border:2px Red Groove" align=center></fieldset> Style Three The code is as follows: <fieldset style= "width:300;height:150;border:2px red Groove; </fieldset> Style Four 1234 The code is as follows: <fieldset style= "width:300;height:150;border:1px dashed #ff9966" align= "center" > <legend style= "border:0px;" > 1234 </legend> </fieldset> Style Five 1234 The code is as follows: <fieldset style= "width:300;height:150;border:1px dashed red" align= "center" > <legend style= "width:100px; border:1px dashed #ff9966 text-align:center;font-family:arial;font-weight:bold "> 1234 </legend> </ Fieldset> Style Six
|
The code is as follows:
<table border=0 cellpadding=0 cellspacing=0 align= "center" > <tr><td bgcolor= #d9d9d9 > <fieldset Style= "width:300;height:150" align=center></fieldset> </td><tr> </table>
HTML tag fieldset