Let me deconstruct the important parts of above code: * This section centers the form inside our web page*/ * This section centers our complete page */
#CREATING FORMS PHP MAKER CODE#
For starters, place the below code just above your tag so as to tell your index.php that someone out their is ready to make her beautiful.
That was it! Our HTML5 tutorial is over and we move on to CSS to style our HTML5 form. I remember spending hours with JavaScript so as to make this possible. placeholder makes life easy – If you noticed the image of our upcoming form above, then you will see the text “Goes Here” in every field.It adds a symbol button in its keypad when the type=”email” field is active. type = “email” enhances iPhone experience – Although browsers that do not understand type=”email” in above code will assume it to be type=”text” yet iPhone makes your life a bit easier.tag need not be closed – Older versions of HTML wanted while HTML5 is satisfied with.HTML5 also has a tag which will be used (obviously) for footer of your webpage.Īgain, you will notice differences between the above HTML5 code and our old versions. Both the tags have been assigned a class “main” so that I am comfortable styling them as I want using my style.css. The and tags – Ever used these tags in earlier versions of HTML? Well, now you can and avoid the usage of div tags.If you haven’t seen the DOCTYPE tag before then ignore this and move on. If you have worked with earlier versions of HTML5 then you will understand what I mean and why am I emphasizing on it. The cleanest ever DOCTYPE -In case you haven’t noticed, the above HTML5 code boasts of a very clean DOCTYPE tag.See any differences from your regular html code? The very initial index.php will look like this: Explaining the setup of same is out of the scope of this tutorial. Please be aware that you will require a web server to test index.php file. Without further discussions, let’s create our first index.php file. It will be a simple contact form as shown below: Note: The code below will work with most of the Internet browsers that are being widely used as of today.įor starters, you must have an idea of what we are going to create. You might have created a lot of contact forms but our purpose here is to do the same using the appreciable features of HTML5.
Here, we will implement a very basic combination of HTML5 with CSS and PHP in order to create a contact form. They bridge the gap virtually between the webmaster and the website visitor. It won’t be possible for me to touch base with every HTML5 feature, but I will be listing down some of those during the course of this tutorial.įorms are an integral part of any website that wants its visitors to get in touch with the owner of that website. HTML5 has been helping webmasters to clean up their code by utilising newly introduced features of the same. HTML5 has made her presence felt around the Internet since its launch.