Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
176 views

Web Tech

The document provides information about HTML, JavaScript, and jQuery through a series of questions and answers. It covers basic concepts like HTML tags, JavaScript syntax and functions, and jQuery selectors and methods. It aims to test the reader's knowledge of these web technologies through pre and post quizzes.

Uploaded by

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

Web Tech

The document provides information about HTML, JavaScript, and jQuery through a series of questions and answers. It covers basic concepts like HTML tags, JavaScript syntax and functions, and jQuery selectors and methods. It aims to test the reader's knowledge of these web technologies through pre and post quizzes.

Uploaded by

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

WEB TECHNOLOGIES (PRIMERS2.

0)

HTML - Pre-Quiz
1. Which element is a container for all the head elements, and
may include the document title, scripts, styles, meta information,
and more?
Select one:
<body></body>
<head></head>
<title></title>
<br></br>

2. HTML stands for __________


Select one:
Hybrid Text Markup Language
Hot Mail
Hyper Text Markup Language
Hot Markup Language

3. An application that lets you search and see material on the


internet is
Select one:
Browser
Homepage
Website
Webpage

4. Which of the following is/are the new feature(s) of HTML5?


Enhanced comment lines
Browser automatically provide space before and after the tag
<p>
Supports offline Storage
Performs Client-Side validation

HTML - Post - Quiz


1. In the web page, we have a field called phoneno and inside this
textbox field, the text : "Only numbers are allowed" must
appear. This should get disappeared automatically once we type
the phoneno into it. Which of the below options will suit the given
scenario?
Select one or more:
<input type="text" value="Only numbers are allowed">
<input type="tel" value="Only numbers are allowed">
<input type="text" placeholder="Only numbers are
allowed">
<input type="tel" default="Only numbers are allowed">
<input type="tel" placeholder="Only numbers are
allowed">

2.Consider the below webpage:

Which of the following is used to do this ?


Select one:
<input type="date" id="date" name="date" list="holidays">
<select id="holidays">
<option label="Republic Day">2017-01-26</option>
<option label="May Day">2017-05-01</option>
<option label="Independence Day">2017-08-15</option>
</select>
<input type="date" id="date"min="2017-01-26"max="2017-08-
15">
<select type="date">
<option label="Republic Day">2017-01-26</option>
<option label="May Day">2017-05-01</option>
<option label="Independence Day">2017-08-15</option>
</select>
<input type="date" id="date" name="date"
list="holidays">
<datalist id="holidays">
<option label="Republic Day">2017-01-26</option>
<option label="May Day">2017-05-01</option>
<option label="Independence Day">2017-08-15</option>
</datalist>

3. If the phone number should accept only 10 digit numbers,


which of the following options will suit?
Select one:
<input type="text" pattern="[0-9]{10}"/>
<input type="text" min="0" max="9" />
<input type="number" min="0" max="9" />
<input type="number" pattern="[0-9]{10}"/>
4. Ram has designed a portal that fetches the citizens' feedback
regarding the voting process in India. The portal allows the end
user to choose either 'like' image or 'unlike' image, so that it gets
redirected to a page : "thanks.html".
Select one:
<form action="thanks.html">
<input type="submit" src="like.jpg"/>
<input type="submit" src="unlike.jpg"/>
</form>
<form action="thanks.html">
<input type="submit">
<img src="like.jpg"/>
<img src="unlike.jpg"/>
</input>
</form>
<form action="thanks.html">
<input type="image" src="like.jpg" alt="submit"/>
<input type="image" src="unlike.jpg" alt="submit"/>
</form>
<form action="thanks.html">
<img href="like.jpg" value="submit"/>
<img href="unlike.jpg" value="submit"/>
</form>

5. Question text

Choose the relavant HTML input type attributes.


Webaddress Answer 1 URL

MobileNo Answer 2 tel

Loan tenure Answer 3 range

PANNO Answer 4 text

Marital Status Answer 5 radio

Email-id Answer 6 email

Java script : Pre-Quiz


1.When a user views a page containing a JavaScript program,
which machine actually executes the script?
Select one:
The Web server
The User's machine running a Web browser
Database Server
A central machine deep within Netscape's corporate offices

2.Which of the below statements are used to comment a line in


JavaScript file?
Select one:
<!-- this is a comment -->
// this is a comment
// this is a comment //
/* this is a comment */

3.When you want to enclose; some JavaScript statements to an


HTML file, which is the correct tag you have to use?
Select one:
<HEAD>
<SCRIPT>
<STYLE>
<BODY>

4.Which of the below java script code helps to change the content
of the paragraph tag dynamically?
<p id="pid1">Aim Higher.. Sky is your limit
Select one:
document.getElement("p").innerHTML = "Never give up!!";
document.getElementById("pid1").innerHTML = "Never
give up!!";
document.getElementByName("p").innerHTML = "Never give
up!!";
#demo.innerHTML = "Never give up!!";

5.Sita wishes to greet the user when the user clicks on "Greet
Me" button. In which event does she need to write the JavaScript
code for greeting the user?
Select one:
onchange
onmouseclick
onclick
onmouseover

6. David, a beginner in web development trying to perform one


particular operation using client side JavaScript. Choose the
correct option(s) that he can't be done with client-side JavaScript?
Select one:
Validate a form
Display the alert box to the user
Send a form's contents by email
Store the form's contents to a database file on the server

Java script : Post-Quiz


1. Which of the below is the correct syntax for exectuing some
code if "amt" is equal to 5000?
Select one:
if (amt == 5000)
if (amt equals 5000)
if (amt = 5000)
if (amt === "5000")

2. Polson is allocated with the task of email validation in java


script. He needs to extract character by character
and check for email validation like looking for @ . etc. Which
method is best suited to extract every character from the text?

Select one:
getCharAt()
characterAt()
charAt()

3. The parseInt() method converts the string to a integer. Before


applying this function, Ram wants to know the type of the
argument that is passed to the function. Which operator in
javascript would support this ?

Select one:
instanceof
isofType
getType
typeof

4. Ram is the developer of Allen Software company. He is


designing the website for the banking application. There is a
button called 'check interest rates'. When that button is clicked,
the user has to be redirected to a seperate page to show the
domestic interest rates. Help Ram in accomplishing this task
using the javascript.
Select one:
window.location
page.location
window. reload
url.newlocation

5. What is the output of the below code snippet


<script type="text/javascript">
amt=55+"55";
document.write(amt);
</script>
Select one:
Error, No Output.
110
5
5555

6. Choose the correct JavaScript statement which helps you to


write "World of JavaScript" in a web page?
Select one:
println ("World of JavaScript")
response.write("World of JavaScript")
System.out.println("World of JavaScript")
document.write("World of JavaScript")

7. Predict the output of the following JavaScript code:


<html>
<head>
<script>
var txt= "pass 70% fail 30%";
var pattern = /\D/g;
var res= txt.match(pattern);
document.write(res);
</script>
</head>
</html>

7,0,%, ,3,0,%
7,0,3,0
7,0,%,3,0,%
p,a,s,s, ,%, ,f,a,i,l, ,%
JQuery : Pre-Quiz
1. Which of the following is/are true about HTML?
Select one or more:
Browser does not throw any error even if we have
mistaken in the HTML syntax
HTML is case sensitive
Some of the tags are self closing while some of the tags
must be explicitly closed in HTML5

2. Which of the following is most appropriate tag in html 5 to


divide the document into logical document groups?
Select one:
<span></span>
<group></group>
<div></div>
<section></section>

3. If you want to change the color of a link to red when moving


mouse pointer on top of it, which CSS property you need to
change?
Select one:
link:visited{ color: red; }
a:hover{ color: red; }
a:moved{color: red; }
a{ color: red; }
4. When referencing an HTML element using jQuery preceded by
a ‘ # ‘ , what JavaScript function is this equivalent to?
Select one:
getElementById
getElementByTagName
getElement
getElementByClassName

5. The following elements are the new elements in HTML 5.


These elements are called _____________
Select one:
Multimedia elements
Control elements
Semantic elements
Graphic elements

JQuery : Post-Quiz
1. Kiran wants to remove all the child nodes from the given div
element. Help him to select the correct option to remove all the
child node from the div element.
<body>
<div>
This is some text
<h2>Good morning</h2>
<p>This is a paragraph inside the div.</p>
</div>
<p>This is a paragraph outside the div.</p>
</body>
Select one:
delete()
None of the above
remove( expr )
empty()

2. Bind an event handler to the "blur" JavaScript event on an


element.Select one:

.blurOn()
.blurElement()
.focus()
.blur()

3. John wants to animate (moving effect) an element in the


webpage he designed. For this, he set its CSS position property
to its default value and applied the animations. If there is no
syntax error in the code, what would be output he gets?
Select one or more:
Run the webpage successfully with animated elements
Animation failed because the CSS position property set to
Fixed
Animation failed because the CSS position property set to
default value
Animation failed because the CSS position property set to
static

4. $("#name").remove(); This will remove the text field when you


click on the button. State true or false.Select one:
True
Fasle

5. jQuery is a JavaScript Object Notation library


Select one:
False
True

6. Rhita wants to replace a jQuery code '$(document).ready(fun)'


using another equivalent method. Help her to find the correct
method from the given options.
Select one:
There is no equivalent function for the given code
$(fun)
jQury(fun)
#(fun)

7. Some people don’t want animation to interfere with their web


page experience. What do I do if I want to let a user turn off the
animation?
Not possible to turn off the animation by the user
Use the jquery method:stop.animation()
Use the jquery method:stop()

8. Raju wants to remove an event handler that was attached with on()
function.Help him to select the correct option.
Select one:
empty()
off()
change()
delete()

You might also like