Top Banner
Hyperlink & Form Pertemuan 11 Matakuliah : L0182 / Web & Animation Design Tahun : 2008
18

Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Dec 14, 2015

Download

Documents

Tristian Punt
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Hyperlink & FormPertemuan 11

Matakuliah : L0182 / Web & Animation Design

Tahun : 2008

Page 2: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

Learning Outcomes

Pada akhir pertemuan ini, diharapkan mahasiswa akan

mampu :• Membuat Web sederhana dengan menggunakan

hyperlink dan form

Page 3: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

Outline Materi

• Hyperlink• The Target Attribute• The Name Attribute• An Image as a Link• Form• Text Fields

• Text Area• Radio Buttons• Checkboxes• Drop-down Box• Button• The Action and Method

Attribute

Page 4: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

Hyperlink

• HTML uses the <a> (anchor) tag to create a link to another document.

• An anchor can point to any resource on the Web : an HTML page, an image, a sound file, a movie, etc.

• The <a> tag is used to create an anchor to link from, the href attribute is used to address the document to link to, and the words between the open and close of the anchor tag will be displayed as a hyperlink.

Page 5: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

Hyperlink (cont..)

Page 6: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

The Target Attribute

• With the target attribute, you can define where the linked document will be opened.

• The line below will open the document in a new browser window :

Page 7: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

The Name Attribute

• The name attribute is used to create a named anchor.• When using named anchors we can create links that can jump

directly into a specific section on a page, instead of letting the user scroll around to find what he/she is looking for.

• The line below defines a named anchor :

• To link directly to the "tips" section, add a # sign and the name of the anchor to the end of a URL, like this :

• A hyperlink to the Useful Tips Section from WITHIN the file will look like this : 

Page 8: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

The Name Attribute (cont..)

Page 9: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

An Image as a Link

Page 10: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

Form

• A form is an area that can contain form elements.• Form elements are elements that allow the user to enter

information (like text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.) in a form.

• A form is defined with the <form> tag.

• The most used form tag is the <input> tag. The type of input is specified with the type attribute.

Page 11: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

Text Fields

• Text fields are used when you want the user to type letters, numbers, etc. in a form.

• In most browsers, the width of the text field is 20 characters by default. 

Page 12: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

Text Area

• Text Area may be as large as your page, and will expand as needed if the person enters more text than can fit in the display area.

Page 13: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

Radio Buttons

• Radio Buttons are used when you want the user to select one of a limited number of choices.

Page 14: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

Checkboxes

• Checkboxes are used when you want the user to select one or more options of a limited number of choices.

Page 15: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

Drop-down Box

Page 16: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

Button

• You should always create a submit button for your forms so that the visitor can deliver the information to you.

• You can give your visitors a reset button so that they can start over with a fresh form.

Page 17: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

The Action and Method Attribute

• When the user clicks on the "Submit" button, the content of the form is sent to another file. The form's action attribute defines the name of the file to send the content to.

• Method attribute specifies the method of transferring the form data to the web server.

• GET sends the data as part of the URL. For example : suppose you enter the value "West Rochester" in the "town" field, the URL will be like this

../cgi-bin/mycgi.pl?town=West+Rochester • POST is the preferred method for sending lengthy form data. When

a form is submitted POST the user does not see the form data that was sent.

Page 18: Hyperlink & Form Pertemuan 11 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.

Bina Nusantara

The Action and Method Attribute (cont..)

• If you type some characters in the text field above, and click the "Submit" button, you will send your input to a page called "html_form_action.asp".