HTML5 Validation
Following example states the use of HTML5 control form validation. <!DOCTYPE html> <html> <body> <h1> HTML5 Form Validation </h1> <hr> <form name=f1> Enter name: <input type=”text” pattern=”[a-zA-Z]+” title=”Your name without space” required /> </br> Email id: <input type=”email” required /> </br> WebAddress: <input type=”url” required/> starts with http:// </br> Phone number: <input type=”tel” pattern=”^\d{2}-\d{10}” required/> […]
