PHP程序员站--PHP编程开发平台
 当前位置:主页 >> 网页制作 >> HTML >> 

符合标准的表单

符合标准的表单

来源:  作者:  发布时间:2007-12-27
符合标准的表单 !DOCTYPE html PUBLIC -//W3C//DTD X
符合标准的表单
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Contact Form</title>
<style type="text/css">
  
form{
  width: 40em;
  margin: 4em auto;
  text-align: left;
}
#form div {
  margin-bottom: 0.5em;
}
input, textarea {
  width: 96%;
  font-size: .9em;
  border: 1px solid #CCCCCC;
  margin-bottom: 0.5em;
  padding: 2px;
  font-family: Arial, Helvetica, sans-serif;
}
input {
  width: 14em;
}
input.button {


  width: 5em;
  background-color: #F1F1F1;
  margin-left: 1em;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9em;
  color: #333333;
}
label {
  float: left;
  width: 7em;
  padding-bottom: 0.4em;
  cursor: pointer;
}
form span{
  color: #CC0000;
  background: #F7F7F7;
  padding: 0 0 0 2px;
}
fieldset{
  border: solid 1px #999;
  padding: 1.5em;
}
legend{
  font-size: 1.5em;
}
.center{
  text-align: center;
  padding: .5em;
}
</style>
</head>
<body lang="en">
<div id="top">
   <form action="index.html">
   <fieldset>
   <legend>Contact Form</legend>


   <div>
     <label for="name">Name : </label>
     <input name="name" type="text" id="name" value="Enter your name here *" maxlength="30" tabindex="1" />
     <span> *</span> </div>
   <div>
     <label for="email">E-mail : </label>
     <input name="email" type="text" id="email" value="Enter your E-mail here *" maxlength="35" tabindex="2" />
     <span> *</span> </div>
   <div>
     <label for="title">Title : </label>
     <input name="title" type="text" id="title" value="Enter title here *" maxlength="30" tabindex="3" />
     <span>*</span> </div>
   <div>
     <label for="introduce">Comments : </label>
     <textarea name="introduce" cols="50" rows="8" id="introduce" tabindex="4">Enter comments here *</textarea>
     <span>*</span> </div>
   </fieldset>
   <div class="center">
     <input name="cmdOk" type="submit" class="button" value="Send" tabindex="5" />
     <input name="cmdReset" type="reset" class="button" value="Reset" tabindex="6" />
   </div>
   </form>
</div>
</body>
</html>
Tags: 标准   div   input   表单    
最新文章
推荐阅读
月点击排行榜
PHP程序员站 Copyright © 2007-2010,PHPERZ.COM All Rights Reserved 粤ICP备07503606号