8 Useful HTML input Attributes, You must know.

When we built forms in our HTML web page then we came across with this type of situation where we want to pop a message to user for there ease.
So here is 8 HTML Attributes that you must know as a web developer.

1. Required attribute

This …


This content originally appeared on DEV Community and was authored by SAIFULLAH??

When we built forms in our HTML web page then we came across with this type of situation where we want to pop a message to user for there ease.
So here is 8 HTML Attributes that you must know as a web developer.

1. Required attribute

This attribute will check whether the input field is filled or not on hitting submit button and shows a massage.
Image

2. autofocus attribute

This attribute will automatic- ally give focus on to the input field when page loads.
Image

3. read only attribute

This attribute tells that an input field should be read only (cannot be changed).
Image

4. pattern attribute

This attribute checks whether the input field value matched the pattern format or not.
Pattern attribute

5. placeholder attribute

This attribute shows the hint that what should be the value in the input field.
Image

6. maxlength attribute

This attribute tells the maximum number of characters that are allowed in that input field.

7. Size Attribute

This attribute specify what should be the width of the input type. Default width size is 20.
Image

8. min and max attribute

The min and max attributes specify the minimum and maximum values for an input element.
Max Min Image

So that's it hope you find it helpful.
If you know something else I'm happy to hear suggest me below.
Thank you.


This content originally appeared on DEV Community and was authored by SAIFULLAH??


Print Share Comment Cite Upload Translate Updates
APA

SAIFULLAH?? | Sciencx (2021-07-25T03:30:36+00:00) 8 Useful HTML input Attributes, You must know.. Retrieved from https://www.scien.cx/2021/07/25/8-useful-html-input-attributes-you-must-know/

MLA
" » 8 Useful HTML input Attributes, You must know.." SAIFULLAH?? | Sciencx - Sunday July 25, 2021, https://www.scien.cx/2021/07/25/8-useful-html-input-attributes-you-must-know/
HARVARD
SAIFULLAH?? | Sciencx Sunday July 25, 2021 » 8 Useful HTML input Attributes, You must know.., viewed ,<https://www.scien.cx/2021/07/25/8-useful-html-input-attributes-you-must-know/>
VANCOUVER
SAIFULLAH?? | Sciencx - » 8 Useful HTML input Attributes, You must know.. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/07/25/8-useful-html-input-attributes-you-must-know/
CHICAGO
" » 8 Useful HTML input Attributes, You must know.." SAIFULLAH?? | Sciencx - Accessed . https://www.scien.cx/2021/07/25/8-useful-html-input-attributes-you-must-know/
IEEE
" » 8 Useful HTML input Attributes, You must know.." SAIFULLAH?? | Sciencx [Online]. Available: https://www.scien.cx/2021/07/25/8-useful-html-input-attributes-you-must-know/. [Accessed: ]
rf:citation
» 8 Useful HTML input Attributes, You must know. | SAIFULLAH?? | Sciencx | https://www.scien.cx/2021/07/25/8-useful-html-input-attributes-you-must-know/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.