Sunday, 10 December 2017

Create Attractive Form Using HTML, CSS and JavaScript

The web has changed a lot in the previous few years and introduction of new technologies like HTML5 and CSS3 has given a boost to it.
We all see a lot of attractive forms on modern day websites. In this tutorial we will learn how to make one using HTML, CSS and a little bit of JavaScript.
So lets start. Here we will make three files:

1. form.html (Frame of the form)
2. style.css (styling of the form)
3. script.js (Make the form interactive)

form.html

So let’s first create the frame of our form, add the below code into the form.html file.


style.css

Now we will add some styling to our form. Add the below code to style.css to make your form attractive.



script.js

Now we will add some interactive elements to our form. The below javascript code will empty the input field when the user will click on it and will restore it if the user leaves it empty. Add the below code into the script.js file.



Now we have successfully made our form after doing all the above things correctly your form will look something as shown below.

Create Attractive Form Using HTML, CSS and JavaScript

If you have any queries then please comment them below.

0 comments:

Post a Comment

Tech UOG