label margin:5px 0; : label « Form « HTML / CSS






label margin:5px 0;

  

<!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 name="Description" content="Information architecture, Web Design, Web Standards." />
<meta name="Keywords" content="your, keywords" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Distribution" content="Global" />
<meta name="Author" content="Erwin Aligam - ealigam@gmail.com" />
<meta name="Robots" content="index,follow" />

<style type='text/css'>
/* form elements */
form {
  margin:10px; 
  padding: 0 5px;
  background: #F5F5F5;  
}
label {
  display:block;
  font-weight:bold;
  margin:5px 0;
}
input {
  padding:2px;
  border:1px solid #eee;
  font: normal 1em Verdana, sans-serif;
  color:#777;
}
textarea {
  width:400px;
  padding:2px;
  font: normal 1em Verdana, sans-serif;
  border:1px solid #eee;
  height:100px;
  display:block;
  color:#777;
}
input.button { 
  font: bold 12px Arial, Sans-serif; 
  height: 24px;
  margin: 0;
  padding: 2px 3px; 
  color: #333;
  background: #e7e6e6 url(MarketPlace-images/button.jpg) repeat-x;
  border: 1px solid #dadada;
}

</style>



<title>Marketplace</title>

</head>

<body>

<!-- wrap starts here -->
<div id="wrap">
      <h3>Example Form</h3>
      <form action="#">      
      <p>      
      <label>Name</label>
      <input name="dname" value="Your Name" type="text" size="30" />
      <label>Email</label>
      <input name="demail" value="Your Email" type="text" size="30" />
      <label>Your Comments</label>
      <textarea rows="5" cols="5"></textarea>
      <br />  
      <input class="button" type="submit" />    
      </p>    
      </form>  
</div>

</body>
</html>
  

   
    
  








Related examples in the same category

1.'label' creates a label and associates it with another element
2.label:after
3.Using the label for element
4.Set style for form label
5.Set font for label
6.Use different font for label and other form controls
7.Set margin-top and display style for label
8.Set label control for right text alignment, padding right 20px
9.Set label after style
10.Set color, background color and font for a label control
11.Set Label padding and text transformation
12.Set label font family and font size
13.Inline label
14.Label style text-align: right
15.label background-color: pink;
16.label color: black;
17.label font-weight: bold;
18.label padding: 4px;
19.label text-transform: uppercase;
20.label font-family: Verdana, Arial, Helvetica, sans-serif;
21.label font-size: xx-small;
22.Positioning labels
23.Label above
24.label display: block;
25.label font-weight:bold;
26.label font-weight:bold;
27.label font-family: "Trebuchet MS", Verdana, Halvetica, Arial;
28.label font-size: 12px;
29.label color: #040507;
30.label display: block;
31.label text-align: right;
32.label width: 100px;
33.Adding underline for labels
34.Place label on the top of a field
35.label text-align: left; text-align: center;
36.Labelled fields
37.Using the label element
38.Implicit labels
39.label float:left; width:100px;
40.Fieldsets and labels
41.Aligning labels with List
42.Block-level labels
43.Top-positioned Text Labels
44.Left-aligned Text Labels