<input> - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:input

Introduction

input element gathers input from the user.

The input Element summary

Item Value
Element: input
Element Type: Phrasing
Permitted Parents: Any element that can contain phrasing elements
Local Attributes: name, disabled, form, type, plus other attributes based on the value of the type attribute
Contents: None
Tag Style:Void
New in HTML5? No, but there are some new types of input, which are accessed through the type attribute.
Changes in HTML5 There are new values for the type attribute in HTML5, and there are several new attributes that are used with specific values for the type attribute.
Style Convention None. The appearance of this element is determined by the type attribute.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
      <title>Example</title> 
   </head> 
   <body> 
      <form method="post" action="http://example.com/form"> 
         <p> 
            <label for="fave">
               Fruit: <!--  w  ww  .  j a v a  2  s . c  om-->
               <input autofocus id="fave" name="fave">
            </label> 
         </p> 
         <p> 
            <label for="name">
               Name: 
               <input disabled id="name" name="name">
            </label> 
         </p> 
         <button>Submit Vote</button> 
      </form>  
   </body>
</html>

Related Tutorials