Wednesday, December 16, 2009

New Media Problem 10 HTML (HOW TO) (PART 3)

Continue From part 2

FOR THOSE WHO HAVENT READ PART 2 ARE ADVISED TO CLICK HERE




FORMS


in this section , we gonna learn how to create forms , used in survey , close ended , open ended half-closed , half-open , whatever ~
<form>
this is where your code will go
</form>
same as what you do for HTML BODY , between opening and closing put an empty space so later you can fill it

inside the forms , you have "input elements" which code looks like this
<form>
<input type="zzz" zzz zzz zzz/>
</form>

there are several types of input elements :
1.text fields ,example of
<form>
First Name : <input type="text" name="firstname"/>
</form>

First Name :

2.Buttons , example
<form>
<input type="radio" name="sex" value="GUY"/> GUY
<input type="radio" name="sex" value="GAY"/> GAY
</form>

GUY
GAY

3.Checkboxes , example
<form>
Gadgets you own
Ipod : <input type="checkbox" name="gadget" value="ipod" />
Zune : <input type="checkbox" name="gadget" value="zune" />
Both : <input type="checkbox" name="gadget" value="both" />
</form>

Gadgets you own
Ipod :
Zune :
Both :

4.Drop down menu , example
<form action="">
<select name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat">Fiat</option>
<option value="audi">Audi</option>
</select>
</form>


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

Username:



note that , the submit button we learn in this phase is nothing more than a display ... in order to learn how to gather ALL the data in a form , will be learned in the future advanced coding and is irrelevant to the current lesson



another thing that you should notice is
<form>
<input type="radio" name="sex" value="GUY"/> GUY
<input type="radio" name="sex" value="GAY""/> GAY
</form>
the word marked in red does not determine the name of the options...same goes to text fields , and checkboxes .

everything(value , name , etc) inside the INPUT ELEMENT is NOT BE DISPLAYED when you open the webpage , the ones which determine is no other than the word coloured in yellow which is a simple paragraph text.
example , this is buttons without YELLOW WORD




as you can see , the buttons didnt have any title , so the reader dont know which one to choose

EMBED


this is the final yet the easiest part of all , embeds ... as you have know are long long codes that makes your blog , website , etc looks nice ...
usually embed code are created by the provider , such as this :

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/oHg5SJYRHA0&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/oHg5SJYRHA0&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

this looks...MESSY , HUGE , COMPLICATED .... etc
and this is the result



dont blame me if i had a bad taste of music , its just an example ... continue ..
embed codes need not to be modified as they are super-user-friendly , you just need to copy paste the chunk of code , and thats it! it will show up exactly what you wanted .

so , with this paragraph i finish my guide for PROBLEM 10 NEW MEDIA HTML GUIDE , thanks for all readers who read this until the end , hope you can have better understanding of the subject and see you next year !! 2010 :D

No comments:

Post a Comment