Homework 2 305

Embed Size (px)

Citation preview

  • 8/6/2019 Homework 2 305

    1/18

    HOME WORK-2

    WEB PROGRAMMING

    Homework Title / No PART-1 & 2 Course Code: 1404

    Course Instructor: PrRis!i C!o"r# Course Tutor $i% #""lic#le':

    (#te o% Allotment: 1)*e"t+ 2010 (#te o% sumission: 21*e"t+ 2010

    Students Roll No.Rtb012A01 Section No. : Tb012.

    Declaration:

    I declare that this assignment is my individual or!. I have not co"ied

    #rom any other students or! or #rom any other source e$ce"t here dueac!noledgment is made e$"licitly in the te$t% nor has any "art been

    ritten #or me by another "erson.

    Students Signature:

    &ano' Sharma.

    (valuators comments:

    )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

    &ar!s obtained: ))))))))))) out o# ))))))))))))))))))))))

    Part-A

    Q.1 Write the code to create thumbnails and steps to create thumbnails

    using appropriate Example.

    *+ead,

    *Title, thumbnail*-title,*-head,

  • 8/6/2019 Homework 2 305

    2/18

    *bgcolor/red/,

    *a hre#/i1.html/ target/ /,

    *img src/i1.'"g/ alt// idth/0/ height/0/,*-a,

    *a hre#/i2.html/ target/ /,

    *img src/i2.'"g/ alt// idth/0/ height/0/,*-a,

    *a hre#/i.html/ target//,

    *img src/i.'"g/ alt// idth/0/ height/0/,*-a,

    *a hre#/i.html/ target/ /,

    *img src/i.'"g/ alt// idth/0/ height/0/,*-a,

    *a hre#/i3.html/ target/ /,

    *img src/i3.'"g/ alt// idth/0/ height/0/,*-a,

    *-html,

    Target lin!

    4or the I1.html

    *html,

    *head,

    *title, thumbnail*-title,*-head,

    *img src/i1.'"g/ border/1/ idth/500/ height/300/,

    *-html,

    4or I2.html

    *html,

    *head,

    *title, thumbnail*-title,*-head,

  • 8/6/2019 Homework 2 305

    3/18

    *img src/i2.'"g/ border/1/ idth/500/ height/300/,

    *-html,

    4or I.html

    *html,

    *head,

    *title, thumbnail*-title,*-head,

    *img src/i.'"g/ border/1/ idth/500/ height/300/,

    *-html,

    4or I.html*html,

    *head,

    *title, thumbnail*-title,*-head,

    *img src/i.'"g/ border/1/ idth/500/ height/300/,

    *-html,

    4or Image.html

    4or Image3 .html

    *html,

    *head,

    *title, thumbnail*-title,*-head,

    *img src/image3.'"g/ border/1/ idth/500/height/300/,

    *-html,

    "utput!

  • 8/6/2019 Homework 2 305

    4/18

    Steps:

    1. 4irst save the "icture as a 67(8 #ile.

    2. Access the +T&9 source code #or the "age you ant toadd a thumbnail to.

    . Ty"e in the #olloing +T&9 code% re"lacing the ords/"ictureR9/ ith the e$act R9 o# the "icture you areusing:

    *a hre#/image1.html/ target/ /,

    *img src/image1.'"g/ alt// idth/0/height/0/,*-a,

    . Save the "age and vie it to see your ne thumbnailimage and associated #ull;si

  • 8/6/2019 Homework 2 305

    5/18

    >.2 ?rite a code #or the #olloing eb "age:

    Ans#er!

    *html,

    *body,

    *h1 ,9ists*-h1,

    *ul,

    $ists

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1. ;;;;;;;;;;;;;;;;;;;;;;;2. ;;;;;;;;;;;;;;;;;;;;;;;. ;;;;;;;;;;;;;;;;;;;;;;;

    I@@@@@@@@@.

    II@@@@@@@@@

    III@@@@@@@@@

    a@@@@@@@@@@@..

    b@@@@@@@@@@@.

    c@@@@@@@@@@@.

  • 8/6/2019 Homework 2 305

    6/18

    *li,;;;;;;;;;;;;*-li,

    *li,;;;;;;;;;;;;;*-li,

    *li,;;;;;;;;;;;;;*-li,

    *ol ty"e /1/,

    *li,;;;;;;;;;;*-li,

    *li,;;;;;;;;;;*-li,

    *li,;;;;;;;;;;*-li,

    *ol ty"e /I/,

    *li,...........*-li, *li,...........*-li,

    *li,...........*-li,

    *ol ty"e /a/,

    *li,...........*-li,

    *li,...........*-li,

    *li,...........*-li,

    *-ol,

    *-ol,

    *-ol,

    *-ul,

    *-body,

    *-html,

    >. ?rite +T&9 code #or #olloing layout using #rames. The

    underlined ords act as hy"erlin! and corres"ond to each

    hy"erlin! the a""ro"riate "age should be o"en.

    9ovely 7ro#essional niversity

  • 8/6/2019 Homework 2 305

    7/18

    Bourse

    s

    School

    s

    Ce"t

    Dloc!s

    Bourses

    Anser:

    %rame coding!

    *html,

    *head,

    *title,eb"age*-title,*-head,

    *#rameset ros/20E%F/,

    *#rame src/97.html/,

    *#rameset cols/20E%F%F/,

    *#rame src/lin!.html/,

    *#rame name/#rame/,

    *-#rameset,

    *-#rameset,

    *-+T&9,

  • 8/6/2019 Homework 2 305

    8/18

    Gut"ut:

    $ining coding.

    *html,

    *head,

    *title,eb"age*-title,*-head,

    *body,

  • 8/6/2019 Homework 2 305

    9/18

    *a hre#/courses.html/ target/#rame/,Bourses*-a,*br,

    *a hre#/schools.html/ target/#rame/,Schools*-a,*br,

    *a hre#/de"t.html/ target/#rame/,Ce"t*-a,*br,

    *a hre#/bloc!s.html/target/#rame/,Dloc!s*-a,

    *-body,

    *-html,

    &ourses coding!

    *html,

    *head,

    *title,eb"age*-title,*-head,

    *body bgcolor/yello/,

    *",*#ont color/red/,*h1,Bourses*-h1,*-",*-#ont,

    97 o##er courses:;

    &anagement*br,

    +otel &anagement%*br,

    Bom"uter A""lication%*br,

    (ngineering%*br,

    Architecture% *br,

    Cesign% *br,

  • 8/6/2019 Homework 2 305

    10/18

    Bommerce% *br,

    4ashion Technology%*br,

    7harmacy% *br,

    7hysiothera"y% *br,

    7aramedical Sciences% *br,

    Diotechnology%*br,

    &icrobiology%*br,

    Diochemistry% *br,

    (ducation% *br,

    7hysical (ducation%*br,

    4ilms% Animation% 4ine Arts% 7er#orming Arts% Sciences% Arts H

    9anguages etc.

    *-body,

    *-html,

    Gut "ut:

  • 8/6/2019 Homework 2 305

    11/18

    'chools coding!

    *html,

    *head,

    *title,eb"age*-title,*-head,

    *body bgcolor/yello/,

    *",*#ont color/red/,*h1,Schools*h1,*-",*-#ont,

    *h1,9ovely School o# Technology *-h1,

    *h1, 9ovely School o# &anagement *-h1,

    *h1, 9ovely School o# (ngineering *-h1,

    *-body,

    *-html,

  • 8/6/2019 Homework 2 305

    12/18

    Gut"ut:

    (ept coding

    *html,

    *head,

    *title,eb"age*-title,*-head,

    *body bgcolor/yello/,

    *",*#ont color/red/,Ce"t*-",*-#ont,

    *-body,

    *locs coding!

    *html,

    *head,

  • 8/6/2019 Homework 2 305

    13/18

    *title,eb"age*-title,*-head,

    *body bgcolor/yello/,

    *",*#ont color/red/,*h1,Dloc!s*-h1,*-",*-#ont,

    *h2,D+ Dloc!;1*-h2,

    *h2,D+ Dloc!;2*-h2,

    *h2,D+ Dloc!;*-h2,

    *-body,

    *-html,

    7art;D

    >. ?rite code #or a ?eb "age hich uses BSS to dis"lay

    relevant data.

    Anser: *-html,

  • 8/6/2019 Homework 2 305

    14/18

    *style ty"e/te$t -css/,

    bodybac!ground;color: red=J

    h1 color: blue= te$t;align: enter=J

    7 #ont;#amily:K Arial/=

    #ont;si

  • 8/6/2019 Homework 2 305

    15/18

    >.3. ?rite code #or a ?eb "age hich uses 6avaScri"t to

    "er#orm various validations on the registration #orm #or an

    organi

  • 8/6/2019 Homework 2 305

    16/18

    i# M"assord.length 0

    alertM/Lou must enter a "assord./=

    return #alse=

    J

    return true=

    J

    *-scri"t,

    *-head,*body,

    *h1,9ogin 4orm*-h1,

    *#orm method/"ost/ action/registration.html/

    onsubmit/return validateMthis=/,

    sername: *in"ut ty"e/te$t/ name/sername/si

  • 8/6/2019 Homework 2 305

    17/18

    >. Breate a +T&9 #orm that calculates electricity bill% maybe

    user ought to have the o"tion o# online "ayment. se 6avaScri"t

    to "er#orm relevant validations #or a given belo.

    *html,

    *head,

    *title, my electricity eb "age*-title,*-head,

    *body,

    *#orm name/(lectricity#orm/,

    *h1,*u,(lectricity billing #orm*-u,*-h1,

    *"re,

    &onthly tility Dill : *in"ut ty"e/te$t/ name/billal/,

    Annual In#lation ME : *in"ut ty"e/te$t/ name/in#Rate/

    value /2/,

    Balculate #or Lears : *in"ut ty"e/te$t/ name/years/,

    *in"ut ty"e/button/ name/calc/ value/ Balculate Savings

    / onclic!/calculate ?inMmy#orm1/,

  • 8/6/2019 Homework 2 305

    18/18

    Total (nergy Bost : *in"ut ty"e/te$t/

    name/totale$"ense/,

    *-"re,

    *-#orm,

    *-body,

    *-html,