Saturday, 19 September 2015

HTML Label Tag

HTML Label Tag

The <label> tag is used to specify a label for an <input> element. It adds a label to a form control such as text, email, password, textarea etc.

HTML Label Tag Example

Let's see the example of HTML label tag.
  1. <html>
  2. <head>
  3. <body bgcolor="blue">
  4. <center>
  5. <marquee>hii iiiiiiiii Welcome to  My Webpage</marquee>
  6. <div class="loginform">  
  7. <label for="email">EMAIL-ID:<br /> <input type="email" value="" name="emailid" size="30"   
  8. placeholder="Enter a valid email address"><br /><br />  
  9. <label for="phone">PHONE NO:<br /> <input type="text" value="" name="phno" size="30"   
  10. maxlength="10" placeholder="Enter a valid phone number" pattern="[0-9]{10}"><br /><br />  
  11. </form>  
  12. </div>    
  13. </form>  
  14. </body>
  15. </center>
  16. </head>
  17. </hrml>
  18. Output



No comments:

Post a Comment