Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
July 25, 2021 03:30 am GMT

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 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.


Original Link: https://dev.to/saifullah/8-useful-html-input-attributes-you-must-know-24k8

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To