🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
~~~ <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <form action="http://www.baidu.com"> <table> <tr> <td>用户名:</td> <td><input type="text" name="username" placeholder="用户名" maxlength="10"/></td> </tr> <tr> <td>密码:</td> <td><input type="password" name="pwd" placeholder="密码" /></td> </tr> <tr> <td>确认密码:</td> <td><input type="password" name="pwd2" placeholder="确认密码" /></td> </tr> <tr> <td>生日:</td> <td><input type="date" name="birthday" /></td> </tr> <tr> <td>性别:</td> <td> <input type="radio" name="sex" value="男" checked/> 男 <input type="radio" name="sex" value="女"/> 女 </td> </tr> <tr> <td>学历:</td> <td> <select name="education"> <option value="1">本科</option> <option value="2" selected>研究生</option> <option value="3">博士</option> </select> </td> </tr> <tr> <td>兴趣爱好:</td> <td> <input type="checkbox" name="hobby" checked="" value="看书"/> 看书 <input type="checkbox" name="hobby" checked="" value="学习"/> 学习 <input type="checkbox" name="hobby" checked="" value="编程"/> 编程 </td> </tr> <tr> <td>备注</td> <td><textarea name="comment" rows="6" cols="30">这个人很懒,什么也没有留下</textarea></td> </tr> <tr> <td></td> <td> <input type="submit" value="注册" disabled=""/> <input type="reset" value="重置" /> <input type="button" value="点我" /> </td> </tr> </table> </form> <!-- markdown table>tr*3>td*3 tab table: thead, 列头行 tbody, 内容行 thead, tbody没有任何的样式效果 什么时候用thead, tbody? 在要为列头和其他行设置不同样式的时候。 跨列:写在th, td上,colspan="2" 改变列宽:在第一行上改变 --> <table border="1px" cellspacing="0"> <thead> <tr> <th>姓名</th> <th colspan="2">JAVA</th> </tr> </thead> <tbody> <tr> <td rowspan="2">费园园</td> <td width="100px">100</td> <td>100</td> </tr> <tr> <td>98</td> <td>98</td> </tr> </tbody> </table> <table border="1px" cellspacing="0"> <tr> <td colspan="2">10</td> <td>10</td> <td colspan="2">10</td> </tr> <tr> <td rowspan="2">10</td> <td>10</td> <td>10</td> <td>10</td> <td rowspan="2">10</td> </tr> <tr> <td>10</td> <td>10</td> <td>10</td> </tr> <tr> <td>10</td> <td colspan="2">10</td> <td>10</td> <td>10</td> </tr> </table> </body> </html> ~~~