欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

HTML学习(二) 表单的制作习作

程序员文章站 2023-12-21 18:12:58
...

表单的制作练习

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>form表单</title>
  6. <style>
  7. div{
  8. width: 300px;
  9. height: 510px;
  10. border: 1px solid #a8c6ea;
  11. margin: 20px auto;
  12. line-height: 35px;
  13. padding: 20px 20px;
  14. }
  15. label:first-child {
  16. font-weight: bolder;
  17. font-size: 16px;
  18. }
  19. </style>
  20. </head>
  21. <body>
  22. <div>
  23. <form action="#">
  24. <label>用户注册</label><br>
  25. 账号: <input name="user" type="text" placeholder="不超过八个字母"><br>
  26. 密码: <input name="pasWd" type="password" placeholder="6-16个字符"><br>
  27. 邮箱: <input name="e-mail" type="email" placeholder="example@mail.com"><br>
  28. 年龄: <input name="eg" type="text" style="width: 30px"><br>
  29. 生日: <input name="year" type="date"><br>
  30. 课程: <select>
  31. <option value="1">HTML5</option>
  32. <option value="2">CSS</option>
  33. <option value="2">JavaScript</option>
  34. <option value="2">PHP</option>
  35. </select><br>
  36. 爱好:
  37. <label><input name="aiHao" type="checkbox" value="">打游戏</label>
  38. <label><input name="aiHao" type="checkbox" value="">看电影</label>
  39. <label><input name="aiHao" type="checkbox" value="">撸代码</label><br>
  40. 性别:
  41. <label><input name="sex" type="radio"></label>
  42. <label><input name="sex" type="radio"></label>
  43. <label><input name="sex" type="radio">保密</label><br>
  44. 简介: <textarea name="" id="" cols="30" rows="10"></textarea><br>
  45. <input type="submit" name="tiJiao" value="提交">
  46. <input type="button" name="ajax" value="Ajax">
  47. </form>
  48. </div>
  49. </body>
  50. </html>

效果图如下HTML学习(二) 表单的制作习作

上一篇:

下一篇: