先见效果图
<title>20181105</title>为浏览页名称
<style type="text/css"> text 为文本 css 层叠样式表 就是告诉浏览器,style使用的样式是css文本
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>20181105</title>
<style type="text/css">
input{
border:1px solid red
}
/* <link href="index.css"; rel="stylesheet"></ link> */
</style>
</head>
<body>
<form id="myfrom" name="myform">
<!-- id与name 键值方式存在,id为键是唯一的 name 可变,可与键相同 -->
<font style="font-size:15px; color:red;">
<!-- font 改变字体的颜色,大小 -->
姓名:(文本框)</font>
<input type="text" id="username" name="userName" placeholder="请输入姓名" style="border: 0px;border-bottom: 1px solid red;"><br />
<!-- <br />换行 placeholder 隐式显示 -->
<label for="nickname">昵称:</ label><input type="text" id="nickname" name="username" value="666"><br />
<!-- for属性规定标签与表单哪个元素想绑定 属性值需与id值相同 显示连接 value值 显式显示 -->
<!-- <label>昵称:<input type="text" name="userName" /> </label> 隐式连接-->
性别:<input type="radio" name="userName" checked="checked"/>男
<!-- checked 默认必选一个 -->
<!-- name值一样时表示同一组数据,用户选择结果根据name来判断,id可加可不加 -->
<input type="radio" name="userName"></ input>女<br />
爱好:(复选框)<input type="checkbox" id="username" name="fav" />
<input type="checkbox" id="username" name="fav" />
<input type="checkbox" id="username" name="fav" /><br />
<label for="pwd">密码:</label><input type="password" id="pwd"/><br />
<input type="button" value="确认" />
<input type="reset" value="重置" />
<br />
学历:<input type="radio" name="education">本科
<input type="radio" name="education"> 高中
<br />
省份:<select class="sel">
<option> -请选择--</ option>
<option>江苏省</option>
<option>安徽省</option>
<option>河南省</option>
</ select><br />
</form>
</body>
</html>