How to create validation using HTML ?
learn with riwash
Article by Technical Riwash
Hello guys in this article i am going to tech you how to create validation.
Like if the fiels are empty then it have empty message. If email is not match then
it give error message.
You have a question that it is possible to make validation using HTML ?
HTML is a markup language and it use for only design.
My answer is yes it is possibe to make/create validation using HTML.
Now, see this example
this is html tags
<html>
<head>
</head>
<body>
<form action="" method="post">
<input type="text" name="username" placeholder="username"/>
<input type="email"name="email" placeholder="email"/>
<input type="submit"name="submit" value="submit"/>
</form>
</body>
</html>
Here in example when you click in submit button it echo like email is required .
It is a validation. But in name field it not present output. what i do?
just write in required in last of input place.
<input type="text" name="username" placeholder="username" required/>
Yes here is now error message like required.
So this way you can make validation in HTML.
Hi my is riwash chamlagain i am web developer/design if you want to contact me
then mail me technicalriwash@gmail.com or www.withmeriwash.com
like comment share and subscribe.

No comments:
Post a Comment