Skip to main content

HTML Tutorial 6: Basic Elements of An HTML Form (Part 2)




In my previous post, I discussed about HTML form (Part 1). Same topic will be continued today and this is the Part 2. In part 1 you've learned creating Text Fields, Password Field, Radio Buttons and Checkboxes. In this post you will learn how to create Submit Button and Drop Down Menu. 


You should open Notepad from your PC to practice this lesson. Then save the html code with .htm or .html extension and then open the saved file with a browser to see the result. Let's begin: 



Drop Down Menu:

Let me begin with creating a drop down menu. This is very interesting as well as easy to create! 

Which one is your Favorite Cell Phone Brand? 
<select>      
<option>Nokia
<option>Samsung
<option>iPhone
<option>BlackBerry 
<option>Others
</select>


You must begin with the <select> tag and end with </select tag>. And every option of the list should start with <option> tag. Then you can type anything as you want. If you type the above text, your browser will show: 

Which one is your Favorite Cell Phone Brand? 



Submit Button:

Submit button is used to send data to the server. After filling up the form, an user need to confirm the email and submit it. 

<input type=submit> denotes a submit button. 

A simple submit button is very easy to create. You just need to write the following code: 

<form>
<input type=submit>
</form>

That's it. Now your browser will show:



It can be used as:

<form>
Username<input type=text>
<input type=submit>
</form>


Username 


Don't Misunderstand! 

You may think you've already learned creating a submit button. Not at all! We've skipped something! Where the submitted data will be sent? We didn't provide any server link. Let's complete the lesson: 

You should use the following code to create a complete submit button: 

<form name="input" action="www.munnamark.blogspot.com" method="get">

Username: <input type=text>
<input type=submit>
</form>
And your browser will show:

Username:
Now if someone hits the submit button, the data will be sent to the server specified in the action attribute (Here: www.munnamark.blogspot.com). 


Putting these elements altogether, hopefully you will be able to create a simple HTML form.  


Stay with Marks PC Solution to get more interesting IT topics!


Comments

Popular posts from this blog

GTA San Andreas Cheat Code (PDF)

After Vice City, San Andreas is the most popular game released by Grand Theft Auto (GTA). Usually GTA releases role playing game. San Andreas is such a game where you can act like a person. You can do everything. You have to take part in missions and complete them.  To make your missions easier, there are lots of cheat codes. If you can properly apply these codes, the tough parts of the game will be easier. Cheat codes are somewhat like keyboard shortcuts of computer programs.  I've shared 63 cheat codes below. There were more cheat codes in my collection, but I've omitted the less important cheats. Effects or result of the cheats are on the left side, and the codes are on the right side.  You can copy the following codes in your PC. And for your convenience, I've also uploaded a PDF file of these codes. You will find the download link at the bottom.  Effect Cheat Code Adrenaline Mode MUNASEF All Cars Explode ALL...

Joining Texts from Multiple Cells in Excel

  Programs like MS Excel is full of functions. There are many useful functions that we don't use or we don't know about. One of them is CONCATENATE. It means joining or linking. With this function you can join texts from multiple cells. Let's see how . . . Suppose you're working in an Excel Worksheet where you need to combine texts from different cells. I'm gonna show you an example. Let's consider the image below -    What do you see ? I've imputed First Name and Last Name. In Full Name column I've used the formula i.e. CONCATENATE. And in the last column I've added Mr. with the full name.    So how do you use this formula ? Here it is -  =CONCATENATE(A2," ",B2) Observe it carefully. You can add more than 02 cells with this functions. Here I've just used 02 cells. You may think what is this " " for ? You may notice that there is a space between the two i.e. " & ".  If you don't use " " then you...

Running Total/ Cumulative Sum in Excel

  Hey Guys! You should have noticed that I'm writing on MS Excel for last few days! To be honest I'm trying to learn some simple and useful tricks of Excel. And I'm also trying to share my knowledge with you. In this post I've come with such a little trick which maybe very useful if you face such situation. Let's begin . . .    Running Total/ Cumulative Sum It means the summation of numbers in a list and it will be updated each time when a number is added or changes. Look at the image below -    Look at the image. There are two columns with numbers. The first one is simply the number list. But the 2nd one is the summation of the list. Each time a new number is added to the first column the second one shows the summation. How to do this?  It's not a magic. Very simple sum formula is used to perform this task. But there is a little trick. You just need to lock the first cell and then every time it will update the running total list.  Here is my list. Sim...