首页 > 代码库 > 第一堂html课。
第一堂html课。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>html</title>
<link rel="stylesheet" href="http://www.mamicode.com/Untitled-3.css" type="text/css">
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<div>
<div class="a">姓名:</div>
<div class="r"><input type="text" name="textfield2"class="b"/></div>
<div class="clear"></div>
</div>
<div>
<div class="a">性别:</div>
<div class="r"><input type="text" name="textfield2"class="b"/></div>
<div class="clear"></div>
</div>
<div>
<div class="a">年龄:</div>
<div class="r"><input type="text" name="textfield3"class="b" /></div>
<div class="clear"></div>
</div>
<div>
<div class="a">个人简历:</div>
<div class="r"><input type="text" name="textfield4"class="c" /></div>
<div class="clear"></div>
</div>
<div>
<div class="a">联系电话:</div>
<div class="r"><input type="text" name="textfield5"class="d" /></div>
<div class="clear"></div>
</div>
<div>
<div class="a">照片:</div>
<div class="r"><input type="file" name="userPhoto"class="d" /></div>
<div class="clear"></div>
<div>
<input type="submit" name="Submit" value="http://www.mamicode.com/登陆" />
</div>
</form>
</body>
</html>
保存于001.html
/* CSS Document */
body{ background-color:#FFFFCC}
.a{ height:20px; width:90px; background-color:#FFFFCC; border:solid #000000 1px; float:left;}
.b{ height:20px; width:80px; background-color:#FFFFCC; border:solid #000000 1px;}
.c{ height:300px; width:500px; background-color:#FFFFCC; border:solid #000000 1px; float:left;}
.d{ height:20px; width:180px; background-color:#FFFFCC; border:solid #000000 1px;}
.clear{ clear:both}
.r{ float:left; text-align:left; padding-left:5px;}
保存于Untitled-3.css
第一堂html课。