Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Control Attributes in HTML5

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 406
    Comment on it

    There are certain attributes that add up in HTML5 which makes the form attributes much more interactive and validation free.

    There are certain example for control attribute:

    1. Read only - This will make the input type in read only mode.
    Ex:

    <input type="text" readonly>

    2. Disabled - This will make the input type in non editable.
    Ex:

    <input type="text" disabled>

    3. min and max - This will makes the input box with a max and min limit.
    Ex:

    <input type="date" max="1990-12-1">
    <input type="date" min="20016-01-02">

    4. Multiple - It helps you to upload more than 1 file.
    Ex:
     

    <input type="file" multiple>

    5. placeholder - It makes your input type with a short hint of that element.
    Ex:

    <input type="text" placeholder="Enter name">

    6. required - It is used for validation as user have to fill that field.
    Ex:

    <input type="text" placeholder="Enter name" required>

    7. steps - It makes your element with the no. of steps that you want to give.
    Ex:

    <input type="number" step="3">


    8. autofocus - It makes you element with the focus on it.
    Ex:

    <input type="text" autofocus>

    These are some example of how we can use these control attribute in our file.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: