HTML-元素练习

时间:2019-06-12
本文章向大家介绍HTML-元素练习,主要包括HTML-元素练习使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
 1 <!DOCTYPE html>
 2 <html>
 3 
 4 <head>
 5     <title>单选复选框</title>
 6     <meta charset="utf-8">
 7     <meta name="author" content="王思怡">
 8     <style>
 9         body {
10             background: pink;
11         }
12         
13         p {
14             color: gray;
15         }
16     </style>
17 </head>
18 
19 <body>
20     <form>
21         <label><input type = "radio" name = "sex"/></label>
22         <label><input type = "radio" name = "sex"/></label>
23         <label><input type = "radio" name = "sex"/>不明</label>
24         <br/>
25         <label><p>请选择您喜欢的水果</p></label>
26         <label><input type = "checkbox" name = "fruits"/>苹果</label>
27         <label><input type = "checkbox" name = "fruits"/>香蕉</label>
28         <label><input type = "checkbox" name = "fruits"/>菠萝</label>
29         <label><input type = "checkbox" name = "fruits"/>橘子</label>
30         <label><input type = "checkbox" name = "fruits"/>西瓜</label>
31         <label><input type = "checkbox" name = "fruits"/>芒果</label>
32         <label><input type = "checkbox" name = "fruits"/>哈密瓜</label>
33         <br/>
34         <br/>
35         <input type="submit" name="submit" value="提交" />
36         <input type="reset" name="reset" value="重置" />
37     </form>
38 </body>
39 
40 </html>
 1 <!DOCTYPE html>
 2 <html>
 3 
 4 <head>
 5     <title>时间</title>
 6     <meta charset="utf-8">
 7     <meta name="author" content="王思怡">
 8     <style>
 9         body {
10             background: pink;
11         }
12     </style>
13 </head>
14 
15 <body>
16     <form method="post">
17         <label>时间:<input type = "time" name = "time"/></label>
18         <br/>
19         <br/>
20         <label>年月:<input type = "month" name = "month"/></label>
21         <br/>
22         <br/>
23         <label>星期:<input type = "week" name = "week"/></label>
24         <br/>
25         <br/>
26         <label>本机时间:<input type = "datetime-local" name = "datetime-local"/></label>
27         <br/>
28         <br/>
29         <input type="submit" value="提交" />
30         <input type="reset" value="重置" />
31     </form>
32 </body>
33 
34 </html>

$flag 上一页 下一页