Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to HTML Part 3 Chapter 2. Learning Outcomes Identify how to design frames. Explain frames’ attributes. Describe the method on designing forms.

Similar presentations


Presentation on theme: "Introduction to HTML Part 3 Chapter 2. Learning Outcomes Identify how to design frames. Explain frames’ attributes. Describe the method on designing forms."— Presentation transcript:

1 Introduction to HTML Part 3 Chapter 2

2 Learning Outcomes Identify how to design frames. Explain frames’ attributes. Describe the method on designing forms on web page: Textbox, Password box, Checkbox, Radio Button, Drop-down menu, Submit & Reset Button

3 2.3.1 Frames Allow you to divide into sub-windows. Content of each frame can be independent. Enable you to display more than one web page at a time. Two types : Horizontal Vertical At least three documents needed to create a frame

4 Defining Frames and tags are used to set the frame type and space (in pixels or percentage) set which HTML file to display and assign name for targeting purposes. display information for browsers that do not support frame function. If you do include this the browser won’t display anything.

5 Creating Horizontal Frame

6 Creating Vertical Frame

7 frameset attribute By default, user can manually resize the frame size by dragging the border. You can add noresize attribute to disable resizing. The frame border can also look ugly so to eliminate it you can add border=0 in the frameset tag. By default, scrollbar will be automatically appear when you have more content than the frame area. You can either force the scrollbar to appear or disable it by applying scroll=“yes” or scroll=“no” attribute in the frameset tag.

8 Nested frame Frames can be arranged in an interesting way by nesting them Frame CFrame B Frame A

9 Nested frame

10 2.3.2 What is Forms … Forms are a way to collect information from web users and transmit it back to web server. The form is an HTML elements that display fields which user can enter information and then click a button to submit it.

11 …Continued and tags are used to create a form. action attribute provides URL or location of the server-side script that will process the data. You can also send the data to an e-mail address by inserting action=“mailto:web@mmu.edu.my” tags are added to create the fields for the users to enter information.

12 Elements in Forms Text-entry fields Password fields Radio buttons Check boxes Drop-down menus Submit and Reset buttons

13 Textbox Allows user to enter non formatted and/or non validated text Example of use: Full name Address Phone No Email

14 Textbox size attribute determine the length of the textbox. maxlength attribute the maximum number of character can be typed in a textbox.

15 Password box Similar to textbox except that the characters is not revealed and replaced with asterisks.

16 Submit/Reset Buttons Submit button is required. Form data will be transmitted to the server when submit button is clicked. The value attribute will determine the label on the buttons. Reset button will clear all form.

17 Creating a Login Form Username : Password :

18 Example (Login form)

19 Checkboxes Allows the user to click on a box to toggle a value to either yes or no. <input type = "checkbox" name=”mailist” value=”yes” checked> I’m interested to join the mailing list

20 Checkboxes Sometimes, there will a group of checkboxes. In this case, you will have all there checkboxes using the same value in the name attribute.

21 Grocery Checklist <input type = "checkbox" name ="groceries" value = "milk" checked> Milk <input type = "checkbox" name ="groceries" value = "bread" > Bread <input type = "checkbox" name = "groceries" value= "eggs" > Eggs Checkboxes

22 Radio Buttons Provide mutually exclusive selection value Only one button may be pressed Pressing an alternate button in a radio button group will automatically remove the previous selection

23 Radio Buttons What Type of Computer do you have? Pentium <input type ="radio" name ="Computer-Type" value ="486DX">486 DX <input type ="radio" name ="Computer-Type“ value ="486SX">486 SX

24 Text Area Fields Allows multiple lines of entry to be typed Can be used to capture comments

25 Text Area Fields Comments: This is text that can be defaulted into the text area field

26 Combo Boxes Provides efficient way to choose a value from a list of valid values Similar to Radio Buttons


Download ppt "Introduction to HTML Part 3 Chapter 2. Learning Outcomes Identify how to design frames. Explain frames’ attributes. Describe the method on designing forms."

Similar presentations


Ads by Google