How to build html sign up form from scratch



As a starter, anytime you come across sign up form, might think it will take a full year for you to code it out. Well, I disagree with your thinking. You can build up sign up form within few minutes.

heads up! Sign up, sign in, sign out, comment box are all same html form elements with different php and JavaScript functions.

Mind you, we are not going to write advance functions. In other words, we are not using JavaScript and php codes to make an example on this post.

So quickly, as usual, html form also has opening and closing syntax. Then inside those syntax, we write the individual input field base on what the developer want.

Example;

<form action="register.php" name="sign-up-form" method="POST">

<input type="text" name="email" placeholder="enter valid email" /><br /><br q/>

<input type="text" name="password" placeholder="choose password" /><br /><br />

<input type="submit" name="submit-button" value="sign up"/>

</form>

Now you need to write the above form code in between the HTML body syntax.

First I write opening form syntax, give it action, name and method attributes.

Secondly, in between the opening and closing syntax, I write two input fields and one submit button to carry out the registration action.

If you carefully look all three input fields has attributes. We have type, name and placeholder attributes for both email and password fields. We also have type, name and value attributes for the submit button.

Comments

Popular posts from this blog

What is HTML and how can one use it?