HTML学习实践之账号注册页面
2017-05-30 17:27
316 查看
做一个注册页面:
使用表格样式,预览要做的注册页面样式。
从图上可以看出来,要做的表格有11行,其中第一和第十,十一行都是跨2列,使用colspan="n"实现跨列,
注册行居中,加下划线;
左边表格注册内容全部左对齐,
右边:
前三行:表格使用type=”text”文本输入,<input>标签里定义输入内容、类型、最大输入长度为6。
第五行:单选项使用type=”redio”,<input>标签里定义输入内容、类型、最大输入长度为6。
六七行:下拉列表使用<select><option>
列表内容</option></select>
第八行:同前三行
第九行:多选项使用type=”checkbox”,加入checked="checked" 表示默认打钩项。
第十行:设置一个提交按钮type="submit",使用style设置按钮的高和宽。
十一行:下划线加文字
这样,一个简单的注册页面就做出来了,虽然代码看起来很烦,其实很简单,都只是HTML前面部分的简单内容相互嵌套形成的。
相对于我这初学者来说,这已经是一个蛮好的练习了,做出来,都说满满的成就感,再怎么简单但还是自己做的嘛。
成果图(去掉表格线):
使用表格样式,预览要做的注册页面样式。
从图上可以看出来,要做的表格有11行,其中第一和第十,十一行都是跨2列,使用colspan="n"实现跨列,
注册行居中,加下划线;
左边表格注册内容全部左对齐,
右边:
前三行:表格使用type=”text”文本输入,<input>标签里定义输入内容、类型、最大输入长度为6。
第五行:单选项使用type=”redio”,<input>标签里定义输入内容、类型、最大输入长度为6。
六七行:下拉列表使用<select><option>
列表内容</option></select>
第八行:同前三行
第九行:多选项使用type=”checkbox”,加入checked="checked" 表示默认打钩项。
第十行:设置一个提交按钮type="submit",使用style设置按钮的高和宽。
十一行:下划线加文字
代码如下:
<!DOCTYPEhtml>
<htmllang="zh_cn">
<head>
<metacharset="UTF-8">
<title>LoveYing注册</title>
</head>
<body>
<form>
<tablewidth="500"cellpadding="5">
<tr>
<tdcolspan="2"align="center">
<h1>注册账号<hr></h1>
</td>
</tr>
<tr>
<tdalign="right"><labelfor="name">呢称:</label></td>
<td><inputtype="text"id="name"maxlength="6"></td>
</tr>
<tr>
<tdalign="right"><labelfor="pwd">密码:</label></td>
<td><inputtype="password"id="pwd"maxlength="12"></td>
</tr>
<tr>
<tdalign="right"><labelfor="repwd">确认密码:</label></td>
<td><inputtype="password"id="repwd"maxlength="12"></td>
</tr>
<tr>
<tdalign="right">性别:</td>
<td>
<inputtype="radio"name="sex"value="male"checked="checked">男
<inputtype="radio"name="sex"value="female">女
</td>
</tr>
<tr>
<tdalign="right">生日:</td>
<td>
<selectname="year">
<optionvalue="1994">1994年</option>
<optionvalue="1995">1995年</option>
<optionvalue="1996">1996年</option>
</select>
<selectname="month">
<optionvalue="1">1月</option>
<optionvalue="2">2月</option>
<optionvalue="3">3月</option>
</select>
<selectname="day">
<optionvalue="1">1号</option>
<optionvalue="2">2号</option>
<optionvalue="3">3号</option>
</select>
</td>
</tr>
<tr>
<tdalign="right">所在地:</td>
<td>
<selectname="right">
<optionvalue="1">中国</option>
<optionvalue="2">美国</option>
<optionvalue="3">英国</option>
</select>
<selectname="province">
<optionvalue="1">广西</option>
<optionvalue="2">上海</option>
<optionvalue="3">北京</option>
</select>
<selectname="ddistrict">
<optionvalue="1">贺州</option>
<optionvalue="2">桂林</option>
<optionvalue="3">南宁</option>
</select>
</td>
</tr>
<tr>
<tdalign="right"><labelfor="phone">手机号码:</label></td>
<td><inputtype="text"id="phone"maxlength="11"></td>
</tr>
<tr>
<td></td>
<td>
<inputtype="checkbox"checked="checked">创建桌面快捷键<br/>
<inputtype="checkbox"checked="checked">我已阅读并同意相关服务条款<br/>
</td>
</tr>
<tr>
<tdcolspan="2"align="center">
<inputtype="submit"value="确认注册"style="width:200px;height:50px">
</td>
</tr>
<tr>
<tdcolspan="2"align="center">
<hr>爱影动漫室©LoveYing.com
</td>
</tr>
</table>
</form>
</body>
</html>
这样,一个简单的注册页面就做出来了,虽然代码看起来很烦,其实很简单,都只是HTML前面部分的简单内容相互嵌套形成的。
相对于我这初学者来说,这已经是一个蛮好的练习了,做出来,都说满满的成就感,再怎么简单但还是自己做的嘛。
成果图(去掉表格线):
相关文章推荐
- HTML&CSS基础学习笔记1.22-一个简单的注册页面
- 纯粹的使用html实现账号注册页面
- HTML&CSS基础学习笔记1.21-简单的注册页面
- JQuery学习实践 实现注册页面密码与明文的转换
- 【Web】HTML 账号注册页面
- 豆瓣学习 :解析 豆瓣新书 html页面
- HTML学习-1简单的注册界面
- webpack前端构建工具学习总结(四)之自动化生成项目中的html页面
- node.js学习之用路由方法获取简单的图文html页面
- 一步步学习SPD2010--第十章节--SP网站品牌化(5)--创建具有功能的HTML页面
- HTML学习---------1.20 使用<a>标签链接到另一个页面
- 爬虫技术 -- 进阶学习(九)使用HtmlAgilityPack获取页面链接(附c#代码及插件下载)
- 补漏学习:在Web服务器磁盘上缓存数据和HTML页面
- YII2框架表单-model(验证)-HTML_help部件 URL_help部件 以注册页面为实例
- 学生信息管理系统注册页面(first html)
- 登录注册页面html模版
- js和html的注册页面
- HTML5+CSS3学习笔记(二) 页面布局:HTML5新元素及其特性
- 在支付页面注册账号的时候加上了订阅邮件的按钮
- JavaScript学习——使用JS完成注册页面表单校验