Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[HTML] Tutorial: Making Forms - Tutorial 2/5
03-28-2011, 08:08 PM
Post: #1
[HTML] Tutorial: Making Forms - Tutorial 2/5
I guess this is going to be the start of a few simple HTML tutorials I post.
Hopefully this isn't moved to Tutorials, I think it would get more attention and recognition here. Smile

Name Forms
- These are just two simple forms you can use for your site for people to fill out various things. Please note that filling these in does nothing. Smile -

As always, start with:
Code:
<html>
<body>

Then type the following. This is the form!
Code:
<form>
First name: <input type="text" name="firstname" /><br />
Last name: <input type="text" name="lastname" />
</form>

Adding this to your website will create this:
[Image: inputforms.png]

If you want to edit what these forms say, all you have to do is replace all of the text that says "Firstname" and "lastname".

Radio Buttons
Difficulty: Easy
Radio Buttons are forms that only let you select one of the options you define in the form. I.E:
- Male
- Female


Code:
<form>
<input type="radio" name="sex" value="male" /> Male<br />
<input type="radio" name="sex" value="female" /> Female
</form>

Placing this in your code will create this:
[Image: inputforms2.png]

Multiple Choice
Difficulty: Easy
Multiple choice boxes enable you to select one or many options in a form.

Code:
<form>
<input type="checkbox" name="vehicle" value="Bike" /> I have a bike<br />
<input type="checkbox" name="vehicle" value="Car" /> I have a car
</form>

Placing this in your code will get you this result:
[Image: inputforms3.png]

Submit Button!
Difficulty: Moderate

Code:
<form name="input" action="html_form_action.asp" method="get">
Username: <input type="text" name="user" />
<input type="submit" value="Submit" />
</form>

Here is what this looks like in a web browser:
[Image: inputforms4.png]

Make sure you end your document with the following!
Code:
</html>
</body>



That's the end of this tutorial! I hope you've learned something! Smile

Tips:
- Go to notepad, type in your coding, and save the document as .html. You can then view your html live!

- If you have questions, post here!
----------------------------------------------------------
- Focnr
Find all posts by this user
Quote this message in a reply
03-28-2011, 08:18 PM
Post: #2
Re: [HTML] Tutorial: Making Forms - Tutorial 1/5
Alright, I think I actually learned something, and that should mean something, if you can teach a dumbass like me, you can teach anyone heheh, so nice job, and I'll be sure to try this out Smile

[Image: SuperSig.jpg]
Find all posts by this user
Quote this message in a reply
03-28-2011, 08:22 PM
Post: #3
Re: [HTML] Tutorial: Making Forms - Tutorial 1/5
Alright Big Grin This is a little more advanced than the basics. I might edit this to about tutorial 2 or 3. So you can learn headers, paragraphs, etc. Smile
Find all posts by this user
Quote this message in a reply
03-28-2011, 08:24 PM
Post: #4
Re: [HTML] Tutorial: Making Forms - Tutorial 1/5
that would be amazing, do you mind if I ask some questions?
just, remember I have never ever done or read anything at all about coding Tongue

[Image: SuperSig.jpg]
Find all posts by this user
Quote this message in a reply
03-28-2011, 08:24 PM
Post: #5
Re: [HTML] Tutorial: Making Forms - Tutorial 1/5
Sure! I'll make a thread where you can ask me stuff so we don't get too off - topic here. Smile
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)