HTML FORMS - Richland Community College
HTML FORMS
- OPENING FORM TAG - GOES AT THE BEGINNING OF THE FORM
- CREATES A TEXT FIELD IN WHICH TO TYPE SOMETHING
- CLOSING FORM TAG - GOES AT THE END OF THE FORM.
FORM TAG ATTRIBUTES:
METHOD: THE FORM MUST INCLUDE INFORMATION ON HOW THE INFORMATION IS TO BE SENT. THERE ARE TWO POSSIBLE METHODS OF SENDING INFORMATION ON THE FORM - GET OR POST. THE MOST COMMON IS POST AND THIS IS THE ONE WE WILL USE.
EXAMPLE:
ACTION: THIS ATTRIBUTE TELLS THE BROWSER WHERE TO SEND THE INFORMATION FOR PROCESSING. WE WILL ONLY USE ONE ACTION, WHICH SENDS THE INFORMATION THROUGH E-MAIL.
EXAMPLE:
- SENDS INFORMATION TO THE DESIGNATED E-MAIL ADDRESS.
INPUT TAG ATTRIBUTES:
NAME: FORM ELEMENTS (WITH THE EXCEPTION OF SUBMIT AND RESET, WHERE IT IS OPTIONAL) MUST BE GIVEN A NAME USING THE NAME ATTRIBUTE IN THE INPUT TAG. WHEN YOU RECEIVE OUR RESULTS BACK FROM THE FORM, IT WON'T BE ADEQUATE TO JUST RECEIVE THE ANSWER - YOU WILL ALSO WANT TO KNOW WHAT QUESTION IS BEING ANSWERED. THE NAME REPRESENTS THE QUESTION AND WILL BE RETURNED ALONG WITH THE ANSWER, SO THE NAME SHOULD BE DESCRIPTIVE OF THE QUESTION BEING ASKED.
EXAMPLE:
- THE INPUT THAT GOES IN THIS TEXT BOX WOULD BE AN ADDRESS, SO YOU NAME IT ADDRESS.
TYPE: THERE ARE SEVERAL POSSIBLE TYPES OF INPUT. THE DEFAULT TYPE IS TEXT, SO IF NO TYPE ATTRIBUTE IS USE IN THE INPUT TAG, THE INPUT WILL BE A TEXT FIELD (BOX).
EXAMPLES:
- CREATES A TEXT BOX; A USER CAN ENTER UP TO 255 CHARACTERS IN THE TEXT FIELD.
- CREATES A CHECKBOX; USER CAN CHECK (OR UNCHECK) AS MANY CHECK BOXES AS YOU HAVE ON THE FORM; THE VALUE ATTRIBUTE IS USED WITH A CHECKBOX TO CHANGE THE DEFAULT VALUE OF 'ON' TO WHATEVER YOU WANT IT TO BE.
NOTE --- SPECIAL TYPE OF CHECKBOX - THIS CHECKBOX WILL BE PRECHECKED WHEN THE FORM IS LOADED INSTEAD OF EMPTY. IT WILL ALSO RETURN THE VALUE OF 'YES' INSTEAD OF THE DEFAULT VALUE OF 'ON'.
- CREATES A TEXTBOX IN WHICH TO ENTER A PASSWORD - AS THE USER TYPES THE PASSWORD IN THE BOX, ASTERISKS WILL APPEAR INSTEAD OF THE ACTUALLY CHARACTERS BEING TYPED
- CREATES A RADIO BUTTON (A ROUND BUTTON IN WHICH A DOT APPEARS WHEN CLICKED ON); IN A GROUP OF RADIO BUTTONS, ONLY ONE CAN BE SELECTED AT A TIME; WHEN ANOTHER ONE IS CLICK, THE DOT DISAPEARS IN THE OTHER BEFORE IT APPEARS IN THE NEW ONE CLICK.
NOTE --- SPECIAL TYPE OF RADIO BUTTON - THIS RADIO BUTTON WILL BE PRESELECTED WHEN THE FORM IS LOADED INSTEAD OF EMPTY. IT WILL ALSO RETURN THE VALUE OF WHATEVER DESIGNATE INSTEAD OF THE DEFAULT VALUE OF 'ON'.
NOTE --- IN RADIO BUTTONS, THE BUTTONS BELONGING TO THE SAME GROUP WILL HAVE THE SAME NAME ATTRIBUTE, BUT A DIFFERENT VALUE THAT CORRESPONDS TO THE CHOICE THE USER MAKES. ONLY ONE CHOICE CAN BE SELECTED FROM THE GROUP OF RADIO BUTTONS WITH THE SAME NAME. WHEN ONE IS CHECKED, THE OTHER IS DESELECTED.
- CREATES A BUTTON WHICH CLEARS THE INFORMATION ON THE FORM
- CREATES A BUTTON WHICH SUBMITS THE INFORMATION FILLED OUT ON THE FORM
NOTE -- THE VALUE ATTRIBUTE IS USED WITH THE RESET AND SUBMIT INPUT TYPES, WHICH WILL ALLOW YOU TO PUT A DIFFERENT LABEL ON THESE BUTTONS.
- THIS CREATES A GRAPHIC SUBMIT BUTTON
VALUE FOR TEXTBOXES: THE VALUE ATTRIBUTE TELLS THE USER OF THE FORM WHAT SHOULD GO IN A TEXTBOX (THIS IS A LABEL OR PROMPT FOR THE USER).
SIZE: IF NO SIZE ATTRIBUTE IS USED, THE USER OF THE FORM WILL ONLY BE ABLE TO SEE 30 CHARACTERS AT A TIME. BY USING THE SIZE ATTRIBUTE, YOU CAN CHANGE HOW MUCH TEXT THE USER WILL BE ABLE TO SEE. THE NUMBER USED IS THE NUMBER OF CHARACTERS THAT THE USER WILL BE ABLE TO VIEW AT ONE TIME.
EXAMPLE:
- ALLOWS THE USER TO SEE 50 CHARACTERS AT ONCE
MAXLENGTH: THIS ATTRIBUTE ALLOWS YOU TO LIMIT THE LENGTH OF THE INFORMATION THAT CAN BE ENTERED INTO A TEXT BOX.
EXAMPLE:
- THE USER WILL ONLY BE ABLE TO ENTER 5 CHARACTERS IN THIS TEXT BOX.
SELECT TAGS:
A POP-UP MENU WHICH DISPLAYS A LIST OF CHOICES FROM WHICH ONE CHOICE MAY BE MADE IS ACCOMPLISHED USING THE SELECT TAGS --- ; THE NAME ATTRIBUTE MUST BE USED WITH THE SELECT TAG. THE SIZE ATTRIBUTE CAN BE USED IN THIS TAG TO DESIGNATE HOW MANY OF THE CHOICES WILL BE VISIBLE WHEN THE FORM LOADS.
OPTION TAGS:
THE OPTION TAGS ARE USED WITH THE SELECT TAGS TO DISPLAY THE CHOICES THAT WILL APPEAR IN THE POP-UP MENU.
NOTE -- THE VALUE ATTRIBUTE CAN BE USED WITH THE OPTION TAG TO DESIGN THE VALUE THAT WILL BE SENT WHEN THE FORM IS SUBMITTED.
SELECTED ATTRIBUTE: USED WITH THE OPTION TAG TO DESIGNATE WHICH CHOICE WILL SHOW WHEN THE FORM IS INITIALLY DISPLAYED. IF NOT INCLUDED IN THE TAG, THE DEFAULT WILL BE THE FIRST OPTION.
MULTIPLE ATTRIBUTE: USED WITH THE SELECT TAG TO ALLOW THE USER TO SELECT MORE THAN ONE CHOICE FROM THE MENU.
TEXTAREA TAGS: THESE TAGS ARE USED TO CREATE A TEXT BOX THAT ALLOWS MORE THAN ONE LINE OF TEXT TO BE ENTERED BY THE USER. THE DEFAULT SIZE OF THE TEXTAREA IS 40 CHARACTERS WIDE BY 4 ROWS HIGH. TO CHANGE THE HEIGHT AND WIDTH OF THE TEXTAREA, YOU CAN USE THE ATTRIBUTES ROWS AND COLS. THE TEXTAREA MUST HAVE A NAME ATTRIBUTE. THE TEXT YOU PUT BETWEEN THE OPENING AND CLOSING TEXTAREA TAGS WILL APPEAR IN THE TEXTAREA WHEN THE FORM IS LOADED.
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- cs118 web engineering d e 2019 sir syed university of
- section 508 application test process
- html forms richland community college
- html forms javascript and cascading style sheets
- lab 15 loops forms and api in js gcet
- changing other elements on a web page
- html or hypertext markup language is an easy way to tell
- tutorial using html5 to produce the html5 logo
Related searches
- why community college is bad
- why community college is better
- why community college is beneficial
- gadsden state community college application
- community college philosophy statement sample
- gadsden state community college anniston al
- gadsden state community college bookstore
- gadsden state community college employment
- gadsden state community college nursing
- community college philosophy statement
- why community college is good
- community college teaching statement