Cat Web Development
Cat Web Development
Instructions:
CAT 2:
1. Create a html page and include the following links: home, about us, location and
Contact us. Nb: under location set a dropdown list for the user to select.
Use hover attribute in that when the user places the cursor there a dropdown list is
displayed. (5 marks)
2. Create a html form that will be used to conduct a survey. The form should entail the
Following: (10 Marks)
Name (First and Last name)
Age (only numeric digits to be accepted)
Phone number (only numeric digits to be accepted)
Date of Birth(should have a date datatype only to display Calendar)
Sex (Boolean only Male or Female, User to select)
County (given atleast 10 options for the user to select)
Password (Hidden, asterisk )
Submit button and Cancel button
FRIENDS
PHOTO
3. a. Write a JavaScript function greetUser() that takes a user's name as input and displays an
alert saying "Hello, [name]!".
b. Explain the purpose of the console.log() function in debugging JavaScript code.
4. i) Write short notes on the following (5 marks)
GET
POST
iii). Describe the difference between inline, internal, and external CSS. Provide an example of
each.
5. Write the HTML code to create a form with the following fields: Name (text), Email
(email), Password (password), and a Submit button. (5 Marks)
7. Using JavaScript, create the following functionality for the webpage in Question 6: (15
Marks)
Validate the contact form fields (Name and Email) to ensure they are not empty
before submission.
Show an alert with the message “Form Submitted Successfully” upon valid
submission.
Create a button that changes the color of the header dynamically when clicked.