Top Banner
1 Web Page Technologies
27

Web Page Technologies

Jan 01, 2016

Download

Documents

shelby-hensley

Web Page Technologies. I n This Lecture You Will Learn About …. Forms Fancy Forms Tables Fancy Tables. Forms. Modern web pages allow you to submit data via forms Anywhere you enter text or select an option or press a button is a form. Forms. The form tag …. . - PowerPoint PPT Presentation
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: Web Page Technologies

1

Web Page Technologies

Page 2: Web Page Technologies

2

In This Lecture You Will Learn About … Forms Fancy Forms Tables Fancy Tables

Page 3: Web Page Technologies

3

Forms Modern web pages allow you to submit

data via forms Anywhere you enter text or select an

option or press a button is a form

Page 4: Web Page Technologies

4

Forms

<form>

</form>

The form tag …

… has 2 compulsory attributes

<form method = “post” action = “mailto: [email protected]>

</form>

Page 5: Web Page Technologies

5

Forms Let’s develop the XHTML for this form

Page 6: Web Page Technologies

6

Forms We start with the form tag

<form method = “post” action = “mailto: [email protected]>

</form>

Then we add the text box

<input type = “text” name = “usersName” size = 20 maxlength = 30 />

Enter Your Name

</br>

Page 7: Web Page Technologies

7

Forms Then we add the submit button

<input type = “submit” value = “Press Here to Submit Your Name” />

And finally the reset button

<input type = “reset” value = “Reset” />

Page 8: Web Page Technologies

8

Forms

<form method = "post" action = "mailto: [email protected]">

<input type = "text" name = "UsersName" size = "20" maxlength = "30" />

Enter Your Name <br />

<input type = "submit" value = "Press Here to Submit Name" />

<input type = "reset" value = "Reset" />

</form>

Page 9: Web Page Technologies

9

Forms You can create more complex forms eg those in on-line tutorial

Page 10: Web Page Technologies

10

Forms

<input type = "text" name = "firstName" size = "20" maxlength = "30" />

First Name <br />

<input type = "text" name = "secondName" size = "20" maxlength = "30" />

Second Name <br />

<input type = "text" name = "emailaddress" size = "20" maxlength = "30" />

e-mail address <br />

The text boxes

Page 11: Web Page Technologies

11

Forms

<select name = "residesIn">

<option> Scotland </option>

<option> England </option>

<option> N. Ireland </option>

<option> Wales </option>

<option> Other </option>

</select>

Where do you live?

<br /> <br />

The Select Field

Page 12: Web Page Technologies

12

Forms

What is your age category? <br />

<input type = "radio" name = "ageCategory" value = "underFive" />

Under 5 <br />

<input type = "radio" name = "ageCategory" value = "sixToTen" />

6 - 10 <br />

<input type = "radio" name = "ageCategory" value = "elevenToEighteen" />

11 - 18 <br />

<input type = "radio" name = "ageCategory" value = "overEighteen" />

Over 18 <br /> <br />

The Radio Buttons

Page 13: Web Page Technologies

13

Forms The Check Boxes

Which of the following types of books do you read? (tick all that apply) <br />

<input type = "checkbox" name = "gardening" value = "gardening" /> Gardening <br />

<input type = "checkbox" name = "cooking" value = "cooking" /> Cooking <br />

<input type = "checkbox" name = "sport" value = "sport" /> Chick Lit <br />

<input type = "checkbox" name = "romance" value = "romance" /> Romantic Fiction <br />

<input type = "checkbox" name = "potter" value = "potter" />

Harry Potter and other similar types of book <br /><br />

Page 14: Web Page Technologies

14

Forms The File

Field

Attach a file containing your 10 favourite books

<input type = "file" name = "favbooksfile" />

<br /> <br />

Page 15: Web Page Technologies

15

Forms

The Text AreaYour comments and suggestions are always useful <br />

<textarea name = "comments" cols = "50" rows = "6">

Please type you comments or suggestions here

</textarea>

<br /> <br />

Page 16: Web Page Technologies

16

Forms The Submit/Reset Buttons

<input type = "submit" value = "Press Here to Submit Name" />

<input type = "reset" value = "Reset" />

Page 17: Web Page Technologies

17

Tables Creating tables is easy

Page 18: Web Page Technologies

18

Tables The table tag …

<table>

</table>

… has an optional attribute

<table border = “1”>

</table>

Page 19: Web Page Technologies

19

Tables You can add a caption

<table border = “1”>

<caption> e-mail Address List </caption>

</table>

Page 20: Web Page Technologies

20

Tables The head of the table <thead> has one

row <tr><table border = “1”>

<caption> e-mail Address List </caption>

<thead>

<tr>

</tr>

</thead>

</table>

Page 21: Web Page Technologies

21

Tables That row contains two headings <th>

<table border = “1”>

<caption> e-mail Address List </caption>

<thead>

<tr>

<th> Name </th>

<th> e-mail Address </th>

</tr>

</thead>

</table>

Page 22: Web Page Technologies

22

Tables The rest of the table is in the body of the

table <tbody>

<table border = “1”>

<caption> e-mail Address List </caption>

<thead> <tr> <th> Name </th> <th> e-mail Address </th> </tr> </thead>

<tbody>

</tbody>

</table>

Page 23: Web Page Technologies

23

Tables The body has three rows

<table border = “1”>

<caption> e-mail Address List </caption>

<thead> <tr> <th> Name </th> <th> e-mail Address </th> </tr> </thead>

<tbody>

<tr>

</tr>

<tr>

</tr>

<tr>

</tr>

</tbody>

</table>

Page 24: Web Page Technologies

24

Tables Each row has two data items <td>

<table border = “1”>

<caption> e-mail Address List </caption>

<thead> <tr> <th> Name </th> <th> e-mail Address </th> </tr> </thead>

<tbody>

<tr> <td> Fred Bloggs </td> <td> [email protected] </td> </tr>

<tr> <td> Joe Soap </td> <td> [email protected] </td> </tr>

<tr> <td> Mickey Mouse </td> <td> [email protected] </td> </tr>

</tbody>

</table>

Page 25: Web Page Technologies

25

Tables Combine

earlier XHTML with tables

Page 26: Web Page Technologies

26

Hot Spots Use tutorial to study hot spots They will be assessed !

Page 27: Web Page Technologies

27

Lecture Slides

www.dcs.napier.ac.uk/~owens/wpt/lectures/wptlecture3.ppt