表单标签:所有需要提交到服务端的表单必须使用<form></form>
<form action="#" method="get">//action提交位置
隐藏字段:<input type="hidden" name="id">
用户名:<input type="text" name="username" size="40px" maxlength="" readonly="" placeholder="" required="required" autofocus="autofocus"><br>
密码:<input type="password" name=""><br>
确认密码:<input type="password" name=""><br>
性别:<input type="radio" name="sex" value="男">男<input type="radio" name="sex" value="女">女
爱好:<input type="checkbox" name="hobby" value="钓鱼">钓鱼
<input type="checkbox" name="hobby" value="打电动" checked="checked">打电动
文件:<input type="file" name="file">
籍贯:<select name="province">
<option>--请选择--</option>
<option value="北京">--北京--</option>
<option value="上海" selected="selected">--上海--</option>
<option value="广州">--广州--</option>
</select><br>
自我介绍:
<textarea>
</textarea>
提交按钮:<input type="submit" value="注册">
普通按钮:<input type="button" value="">
重置按钮:<input type="reset" value="">
</form>
<head>
<style type="text/css">/*CSS选择器*/
span{
font-size: 30px
}
.div1{/*类选择器*/
font-size: 30px;
color:pink;
border: 1px solid red;
width: 300px;
height: 150px;
float: left;/*CSS浮动*/
}
.div2 p{/*层级选择器*/
font-size: 15px;
color: red;
float: left;
}
#div3{/*//id选择器*/
font-size: 10px;
color: yellow;
float: left;
}
#clear{/*清除左右两侧浮动*/
clear: both;
}
</style>
</head>
<body>
<span>
华盛大厦
</span>
<div class="div1">
佛挡杀佛
</div>
<div id="clear">
</div>
<div class="div2">
<p>
第三方
</p>
</div>
<div id="div3" style="font-size: 50px;color: blue">
规范规定
</div>
</body>
<head>
<style type="text/css">
input[type='text']{
background-color: red;
}
</style>
</head>
<body>
用户名:<input type="text" name="username">
密码:<input type="password" name="password">
</body>
HTML常用标签+CSS常用样式
猜你喜欢
转载自blog.csdn.net/qq_37822034/article/details/83281058
今日推荐
周排行