0% found this document useful (0 votes)
5 views

Assignment-on-Web

Uploaded by

hnaila868
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Assignment-on-Web

Uploaded by

hnaila868
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Q1. Describe the difference between client-side programming and server-side programming.

Q2. Create an HTML5 document containing an ordered list of three items—ice cream, soft serve
and frozen yogurt. Each ordered list should contain a nested, unordered list of your favorite flavors.
Provide three flavors in each unordered list.

Q3. A local university has asked you to create an HTML5 document that allows prospective
college students to provide feedback about their campus visit. Your HTML5 document should
contain a form with text fields for a name and e-mail. Provide checkboxes that allow prospective
students to indicate what they liked most about the campus. The checkboxes should include:
campus, students, location, atmosphere, dorm rooms and sports. Also, provide radio buttons that
ask the prospective students how they became interested in the college. Options should include:
friends, television, Internet and other. In addition, provide a text area for additional comments, a
submit button and a reset button.

Q4. Create a website registration form to obtain a user’s first name, last name and e-mail address.
In addition, include an optional survey question that asks the user’s year in college (e.g.,
Freshman). Place the optional survey question in a details element that the user can expand to see
the question.

Q5. Write a CSS rule that changes the color of all elements containing attribute class = "green-
Move" to green and shifts them down 25 pixels and right 15 pixels.

Q6. Make a navigation button using a div with a link inside it. Give it a border, background, and
text color, and make them change when the user hovers the mouse over the button. Use an external
style sheet.
Q7. Create a text shadow on the phrase "New features in CSS3" with a horizontal offset of 2px, a
vertical offset of 5px, a blur radius of 6px and a text-shadow color deepskyblue.

Q8. Create three div elements, each with a width and height of 100px. On the first element, create
slightly rounded corners using a border of 3px black and border-radius of 10px. On the second
element, use a border of 3px black and increase the border-radius to 50px. On the third, use a
border of 3px black and increase the border-radius to 100px. Make the background-color of each
element a different color of your choosing. Inside each element, display the value of the border-
radius in bold text.
Q9. Create three div elements of varying colors, each with a width and height of 200px. On the
first box, add a dimgrey box-shadow with a horizontal offset of 15px, a vertical offset of 15px and
a blur radius of 20px. On the second box, add a dimgrey box-shadow with a horizontal offset of -
15px, a vertical offset of -15px and a blur radius of 30px. On the third box, add a dimgrey box-
shadow with a horizontal offset of 15px, a vertical offset of 15px and a blur radius of 10px.

Q10. Write a script that asks the user to enter two numbers, obtains the two numbers from the user
and outputs text that displays the sum, product, difference and quotient of the two numbers. Use
the techniques shown in below figure:
Q11. Write a script that takes three integers from the user and displays the sum, average, product,
smallest and largest of the numbers in an alert dialog.
Q12. Write a script that reads five integers and determines and outputs markup that displays the
largest and smallest integers in the group. Use only the scripting techniques.

Q13. Drivers are concerned with the mileage obtained by their automobiles. One driver has kept
track of several tankfuls of gasoline by recording the number ofmiles driven and the number of
gallons used for each tankful. Develop a script that will take as input the miles driven and gallons
used (both as integers) for each tankful. The script should calculate and output HTML5 text that
displays the number of miles per gallon obtained for each tankful and prints the combined number
of miles per gallon obtained for all tankfuls up to this point. Use prompt dialogs to obtain the data
from the user.

Q14. Write a script that uses looping to print the following table of values. Output the results in
an HTML5 table. Use CSS to center the data in each column.

Q15. Write a function minimum3 that returns the smallest of three floating-point numbers. Use
the Math.min function to implement minimum3. Incorporate the function into a script that reads
three values from the user and determines the smallest value.
Q16. Create an XML document that marks up the nutrition facts for a package of Grandma White’s
cookies. A package of cookies has a serving size of 1 package and the following nutritional value
per serving: 260 calories, 100 fat calories, 11 grams of fat, 2 grams of saturated fat, 5 milligrams
of cholesterol, 210 milligrams of sodium, 36 grams of total carbohydrates, 2 grams of fiber, 15
grams of sugars and 5 grams of protein. [Hint: Your markup should contain elements describing
the product name, serving size/amount, calories, sodium, cholesterol, proteins, etc. Mark up each
nutrition fact/ingredient listed above.]

Q17. Explain the processing system of XML Documents.


Q18. Explain the validating system of XML Documents.
Q19. Create a form using PHP as below and write appropriate database connection and insertion
code to put the form data in Database (username: user, Password: pass).

Q20. Write a PHP regular expression pattern that matches a string that satisfies the following
description: The string must begin with the (uppercase) letter A. Any three alphanumeric
characters must follow. After these, the letter B (uppercase or lowercase) must be repeated one or
more times, and the string must end with two digits.

Q21. Describe how input from an HTML5 form is retrieved in a PHP program.
Q22. Write a PHP script that tests whether an e-mail address is input correctly. Verify that the
input begins with series of characters, followed by the @ character, another series of characters, a
period (.) and a final series of characters. Test your program, using both valid and invalid e-mail
addresses.

Q23. Write the XHTML code to create a form with the following capabilities
a) A text widget to collect the users name.
b) Four checkboxes one each for the following items:
I. Four 100 watt light bulbs for TK. 200
II. Eight 100 watt light bullbs for TK. 400
III. Four 100 watt LED bulbs for TK. 600
c) A collection of three radio buttons that are labeled as follows:
I. Visa
II. Master Card
III. Discover
Q24. Write the XHTML code to create a form that collects favorite popular songs, including the
name of the song, the composer and the performing artist or group. This document must call the
PHP script when the form is submitted and another to request a current list of survey result.

You might also like