0% found this document useful (0 votes)
93 views12 pages

Practice Set (For Students)

Uploaded by

Arnav Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views12 pages

Practice Set (For Students)

Uploaded by

Arnav Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Web Technology (Practice Set)

Syllabus of MTE

WEB SITE BASICS AND HTML5 Web Essentials: Clients, Servers, and Communication-The Internet –
Basic Internet protocols – WWW – HTTP Request Message –HTTP Response Message – Web Clients-
Web Servers-Web development strategies-

Introduction to HTML5: Basic Elements, Form Elements, Media Elements, HTML5 Graphics (Canvas,
SVG)-XHTML: Syntax and Semantics-Case Study: Create a static Website. FRONT END DESIGN USING
CSS3 AND BOOTSTRAP FRAMEWORK CSS : Types of CSS, CSS Properties -CSS3: Selector String, Box
Model, Text Properties, CSS 3D Transformation, CSS Animation- Bootstrap Framework: BS Grid,
Tables, Images, Alerts, Form Elements. Representing Web Data: Basic XML- DTD- Namespaces-XML
Schema, DOM, XSL and XSLT Transformation- Case study: Online Blog Creation

DYNAMIC WEB PAGE DESIGN USING JAVA SCRIPT AND JQUERY Java Script: Data Types and
Variables -Operators - Control Statements - Functions -Objects - Build in Objects - DOM - Java Script
Event Handling - Form Handling and validations - AJAX & JQuery: IntroductionAjax Client Server
Architecture- Ajax Client Server Architecture-XML Http Request Object-Call Back Methods-JQuery
Selectors - JQuery Animations - Effects - Event Handling - JQuery DOM Traversing-JSON - JQuery
AJAX-

Practice Questions

1. Explain the working of Web.

2. Mention the names of organizations which are controlling Internet.


3. Which protocol is used in Mail transfer?
4, What are the protocols used in Internet communication?
5. Give Examples of Internet browsers.
6. Explain Dial-Up Connectivity to start Internet.
7. How does web browser searches any web resource?
8. What is the meaning of stateless protocol? Mention the name of an stateless protocol.
9. What is the architecture of Internet? Explain its working.

10. Explain the use of HTTPS used in the Internet. How is this related to security?

11. What is the purpose of <head> tag in HTML What are different tags used in <head>
tag? Explain with the help of a suitable example.
12. What are different ways to add CSS in a web page? Write a program to add CSS
using all the possible ways.
13. How can we add image in a web page? Write the names of four attributes used for
image show.
14, How do we move text in the direction bottom to up in a web page? Explain with a
suitable example in which text direction will be bottom to top and image from up to
down.
15. What is the use of box properties in a web page?
16. Write down the names of technologies used in client side and server side
programming.

17. Find out the measures differences between HTML and XHTML?

18. Draw the following figure using <table > tag

19. Create a web page using links, list, div, images and videos.

20. Write an XML file which will display the Book information which includes the
following: Title of the book, Author Name, ISBN number, Publisher name, Edition
and Price. Validate the above document using DTD and XML Schema.
21. Create two links using HTML in which first link will connect to another page the
second linl to heading in the same page.

22. Demonstrate the following using HTML codes.


a. Unordered List
b. Ordered List
c. Definition List
d. Nested List

23. Create a webpage using HTML to describe your department using paragraph and use
innerHTML,

24. Explain the structure of XML. What is the use of DTD in XML?

25. Write an XML document to store the details of Employees. Also design a web page to
26. get the input of Employee id and the full details from the XML document.
27. Create a sample code to illustrate types of Style sheets for your web page. Explain
with an example.
29. Write an XML for person information and access the data using XSL. How do we
write XML schema?
30. Create a web page in which use <DIV> tag, CSS classes and CSS box properties.

31. What are different popups in JavaScript? Explain the use of all with the help of
suitable example.
32. How can we print the content of web page visible on the window screen?
33. Develop a web page and add JavaScript using all the possible ways.
34. Write a JavaScript code to validate an email id using JavaScript. There should be one
@ and a dot after the @ symbol.

35. Develop an HTML form and stop user in submitting blank form using JavaScript.

36. Construct a Dropdown list using HTML Can we select more than one value at a time?

37. Write a java script program which shows history and other DOM objects.

38. Make use of AJAX in web programming with a suitable program.

39. Construct a system in which book a cinema ticket with the help of HTML, CSS &
JavaScript.

40. Write a program to add two numbers using “Prompt box” in JavaScript.

41. Why is JavaScript Object Notation (JSON) important in web application? Explain
with the help of a suitable program.

42 What is the utility of Jquery? Explain with the help of a suitable example.

43. Can we reduce the length of JavaScript using JQuery? Explain with a suitable
example.

44. Write a program using Java script which gives browsers information and history
object.

45. Create a webpage containing 3 overlapping images using HTML, CSS and JavaScript.
46. Further when the mouse is over any image, it should be on the top and fully displayed.

47. Create a web page which divides the page in two equal frames and place the audio
and video clips in frame-1 and frame-2 respectively. Execution will be on the basis of
user input: (Sad / Happy).

48. Create a calculator using HTML, CSS and JavaScript.

49. Write a JavaScript program to input name and address of a visitor and display a
greeting message.
50. Can we copy content of an array into the other array? Write a program in this
support.

51. Create an enquiry form using Java script and

52. Why must one use JSON over XML? Explain with the help of a suitable example.

53. Explain the importance of Boot Strap. Write a program to show the utility of Boot
Strap. Book a railway ticket using web pages. One page for user registration, one for
source and destination selection and the third page will be for different ways of
payment.

54. To create a web page which includes a map and display the related information when
a hot spot is clicked in the map.

55. Develop and interpret a XHTML file that includes Javascript script for the
following problems:
a) Input: A number n obtained using prompt box
Output: The first n Prime numbers
b) Input: A number n obtained using prompt
Output: A table of numbers from 1 to n and their squares using alert

56. Create a web page using HTML, CSS and javascript ii which there will be 4 pages
related to Flight booking. First page will show the general information about the
Airlines including pictures and management. Second page will show about the food
items available. Third will contain the expenditure information in which user fills the
requirement using form and java script will show the expenditure and the fourth page
is for user registration.

57. Why do we use AJAX in web programming? Write a AJAX program which print
table of a given number.

58. What is internet? Discuss the various internet services in brief.


59. What do you mean by web projects?
60. Explain the Client-Server architecture with diagram.
61. Write a HTML page with JavaScript that accepts student’s information (RollNo,
Name, Address, Email) from user and performs following validation:
(i) RollNo field should have only digit (ii) Name field should have only
character
(iii) Email should be valid email
Explain the program in brief.
62. Write a XML file for Book details (BookNo, Title, Publisher, Price) with one attribute
‘Qty’ in ‘Title’ element that shows quantity of the book. Write corresponding DTD or
XML Schema to validate the XML file of Book details. Explain the program in brief.
63. Describe benefit of AJAX in a web site. How will you specify handler in AJAX?
What are the values of readyState property and their purpose?
64. Explain class and id selctors used in CSS with examples of each. What is the purpose of
Inline CSS? Explain Inline CSS with example.
65. Write an XML program for three employee information
(empno,empname,desgination,salary) using corresponding DTD or XSD. Explain the
program. Include attribute (type) at the element empno and attribute (mode) on
element “salary”.

66. Create an HTML page named as “String_Math.html” and within the script tag define some
String variables and use different String functions to demonstrate the use of predefined
function. Do the same for the Math function.

67. Define box model in CSS with the help of block diagram.
68. Enlist the advantages of XML schema over Document Type Definition.
69. What is the use of CSS classes in web designing?
70. What is the use of bootstrap in web programming? How can we add bootstrap in our
web page?

,,,,,,,,,,,,,,,,,,,,,,,

Develop and interpret a XHTML file that includes Javascript script for the
following problems:
a) Input: A number n obtained using prompt box
Output: The first n Fibonacci numbers
b) Input: A number n obtained using prompt
Output: A table of numbers from 1 to n and their squares using alert

<html>
<body>
<script type="text/javascript">
//initialize variables
var fib1=0,fib2=1,fib=0;
var n=prompt("enter a number");
if(n!=null && n>0)
{
document.write("<h1>First " + n + " fibonacci numbers are: </h1><br>");
//if input is one number
if(n==1)
document.write("<h1>" + fib1 + "</h1><br>");
//if input is two numbers
else
document.write("<h1>" + fib1 + "</h1><br><h1>" + fib2 + "</h1><br>");
//if input is more than two numbers, find the next Fibonacci number
for(i=3;i<=n;i++)
{
fib=fib1+fib2;
document.write("<h1>" + fib + "</h1><br>");
fib1=fib2;
fib2=fib;
}
}
else
alert("No proper input");
</script>
</body>
</html>

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
XML file which will display the Book information

------------------------------------------------------------------------------------------------------------
AIM: Write an XML file which will display the Book information.
It includes the following:
1) Title of the book
2) Author Name
3) ISBN number
4) Publisher name
5) Edition
6) Price
Write a Document Type Definition (DTD) to validate the above XML file.
Display the XML file as follows.
The contents should be displayed in a table. The header of the table should be in color GREY.
And the Author names column should be displayed in one color and should be capitalized and in
bold. Use your own colors for remaining columns.
Use XML schemas XSL and CSS for the above purpose.

DESCRIPTION:

DTD vs XML Schema


The DTD provides a basic grammar for defining an XML Document in terms of the
metadata that comprise the shape of the document. An XML Schema provides this, plus a
detailed way to define what the data can and cannot contain. It provides far more control for the
developer over what is legal, and it provides an Object Oriented approach, with all the benefits
this entails.
Many systems interfaces are already defined as a DTD. They are mature definitions, rich
and complex. The effort in re-writing the definition may not be worthwhile.
DTD is also established, and examples of common objects defined in a DTD abound on the
Internet -- freely available for re-use. A developer may be able to use these to define a DTD
more quickly than they would be able to accomplish a complete re-development of the core
elements as a new schema.
Finally, you must also consider the fact that the XML Schema is an XML document. It has
an XML Namespace to refer to, and an XML DTD to define it. This is all overhead. When a
parser examines the document, it may have to link this all in, interpret the DTD for the Schema,
load the namespace, and validate the schema, etc., all before it can parse the actual XML
document in question. If you're using XML as a protocol between two systems that are in heavy
use, and need a quick response, then this overhead may seriously degrade performance.

 Write a Document Type Definition (DTD) to validate the XML file.

PROGRAM:
XML document (bookstore.xml)

<bookstore>
<book>
<title>web programming</title>
<author>chrisbates</author>
<ISBN>123-456-789</ISBN>
<publisher>wiley</publisher>
<edition>3</edition>
<price>350</price>
</book>
<book>
<title>internet worldwideweb</title>
<author>ditel&amp;ditel</author>
<ISBN>123-456-781</ISBN>
<publisher>person</publisher>
<edition>3</edition>
<price>450</price>
</book>
</bookstore>

XML document Validation using DTD


DTD document (bookstore.dtd)

<?xml version="1.0" encoding="UTF-8"?>


<!ELEMENT bookstore (book+)>
<!ELEMENT book (title,author,ISBN,publisher,edition,price)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT ISBN (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>
<!ELEMENT edition (#PCDATA)>
<!ELEMENT price (#PCDATA)>

Bookstore.xml
<!DOCTYPE bookstore SYSTEM "C:\Documents and Settings\Administrator\My
Documents\bookstore.dtd">
<bookstore>
<book>
<title>web programming</title>
<author>chrisbates</author>
<ISBN>123-456-789</ISBN>
<publisher>wiley</publisher>
<edition>3</edition>
<price>350</price>
</book>
<book>
<title>internet worldwideweb</title>
<author>ditel&amp;ditel</author>
<ISBN>123-456-781</ISBN>
<publisher>person</publisher>
<edition>3</edition>
<price>450</price>
</book>
</bookstore>

XML document Validation using DTD


XML Schema (bookstore.xsd)

<?xml version="1.0" encoding="UTF-8"?>


<xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="bookstore">
<xs:complexType>
<xs:sequence>
<xs:element name="book" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string"></xs:element>
<xs:element name="author" type="xs:string"></xs:element>
<xs:element name="ISBN" type="xs:string"></xs:element>
<xs:element name="publisher" type="xs:string"></xs:element>
<xs:element name="edition" type="xs:int"></xs:element>
<xs:element name="price" type="xs:decimal"></xs:element>
</xs:sequence>
</xs:complexType>

</xs:element>

</xs:sequence>
</xs:complexType>

</xs:element>
</xs:schema>

Bookstore.xml
<bookstore xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="C:\Documents and Settings\Administrator\My
Documents\bookstore.xsd">
<book>
<title>web programming</title>
<author>chrisbates</author>
<ISBN>123-456-789</ISBN>
<publisher>wiley</publisher>
<edition>3</edition>
<price>350</price>
</book>
<book>
<title>internet worldwideweb</title>
<author>ditel&amp;ditel</author>
<ISBN>123-456-781</ISBN>
<publisher>person</publisher>
<edition>3</edition>
<price>450</price>
</book>
</bookstore>

 Display the XML file as follows.

PROGRAM:
XML:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="bookstore.xsl"?>

<bookstore>
<book>
<title>Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book>
<title>Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book>
<title>Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
XSL:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2> My Books collection</h2>
<table border="1">
<tr bgcolor="red">
<th align="left">title</th>
<th align="left">author</th>
</tr>
<xsl:for-each select="bookstore/book">
<tr>
<td><xsl:value-of select="title"/></td>
<xsl:choose>
<xsl:when test="price &gt; 30">
<td bgcolor="yellow"><xsl:value-of select="author"/></td>
</xsl:when>
<xsl:when test="price &gt; 10">
<td bgcolor="magneta"><xsl:value-of select="author"/></td>
</xsl:when>
<xsl:otherwise>
<td><xsl:value-of select="author"/></td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
OUTPUT:
http://wikibrand.blogspot.in

RESULT: Thus the XML stylesheets are successfully used to display the content in a table
format.
SOURCE:PVPSIT FOR JNTUK

You might also like