Create an HTML form for signup. The form should contain form elements for username, password, email, country, gender, and hobbies. The username should be at least of 8 length, password should be of 6 length having at least one digit. The username and password should be present. The email should be valid. The country field in dropdown should be selected. The gender and hobbies in radio and checkboxes should also be checked respectively. Now write JavaScript function to validate the form as per mentioned. [10]
2.
What are HTML form events? Write HTML script that prints some texts during onchange and onfocus event of some form elements. [5]
3.
How exception handling is done in JavaScript? Write a JavaScript program that will handle an exception when an input number is divided by zero. [5]
Introduction
1.
Describe HTTP Request and Response. [5]
Markup Language
1.
Define HTML head and body tags. Write HTML script to display following output. The title of the page should be 'BIT Web Tech'.
[10]
2.
Write HTML script to markup photo in an HTML document using figure tag. The source path of the photo is D:\BIT\CAMPUS.JPEG. Set the alternate text to 'BIT'. The caption of the figure should be 'This is the BIT Campus'. [5]
Style Sheets
1.
How inline, internal, and external CSS are used in an HTML document. Illustrate with examples. Your CSS should include at least one class selector and id selector. [10]
2.
Write internal CSS to illustrate the static, relative, and fixed position property of an HTML element. [5]
XML
1.
What is XMLHttpRequest Object? Write AJAX script to demonstrate use of XMLHttpRequest Object. [5]
2.
What is Xquery? Given following XML, write an XQuery to retrieve the title of movies having budget greater than 500. Write result of the XQuery expression.
[5]
3.
What is the use of XML? Why is it called extensible, justify with example. [5]