html之form标签的四大护法

form表单下面的标签记住下面这几个就可以了,常用的也就这么多。

1.input
--用户名输入框
<input type="text" name="username" placeholder="用户名">

--密码输入框
<input type="password" name="password" placeholder="密码">

--复选框
<input type="checkbox" name="hobby" value="read">

--单选框
<input type="radio" name="gender" value="men">

--重置按钮
<input type="reset" value="重置">

--提交按钮
<input type="submit" value="提交注册">

2.textarea文本输入框
<textarea name="简介">

3.select多选框
<select name="province">
     <option value="henan">河南省</option>
     <option value="henan">河北省</option>
</select>

4.table列表
<table border="1px">
   <tr>
      <th>姓名</th>
      <th>性别</th>
      <th>年龄</th>
   </tr>
    <tr>
      <td>张三</td>
      <td>男</td>
      <td>20岁</td>
    </tr>
</table>

上面4中table标签的效果如下图:

如果以后写项目遇到了其他需要用的参数,再百度就行了,记住上面这些基本足够应对日常的应用了。

posted @ 2024-08-30 15:44  疯狂Python  阅读(18)  评论(0)    收藏  举报