","acceptedAnswer":{"@type":"Answer","text":"True"}},{"@type":"Question","name":"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 th","acceptedAnswer":{"@type":"Answer","text":"True"}},{"@type":"Question","name":"When a user views a page containing a JavaScript program, which machine actually executes the script?","acceptedAnswer":{"@type":"Answer","text":"True"}},{"@type":"Question","name":"David, a beginner in web development trying to perform one particular operation using client side JavaScript. Choose the correct option(s) that he can","acceptedAnswer":{"@type":"Answer","text":"True"}},{"@type":"Question","name":"When you want to enclose; some JavaScript statements to an HTML file, which is the correct tag you have to use?","acceptedAnswer":{"@type":"Answer","text":"True"}},{"@type":"Question","name":"Rhita wants to replace jQuery's $(document).ready(fun) with an equivalent shorter method.","acceptedAnswer":{"@type":"Answer","text":"$(fun)"}},{"@type":"Question","name":"$(\"#name\").remove(); This will remove the text field when you click on the button. State true or false.","acceptedAnswer":{"@type":"Answer","text":"True"}},{"@type":"Question","name":"jQuery is a JavaScript Object Notation library","acceptedAnswer":{"@type":"Answer","text":"False"}},{"@type":"Question","name":"Bind an event handler to the \"blur\" JavaScript event on an element.","acceptedAnswer":{"@type":"Answer","text":"True"}},{"@type":"Question","name":"Raju wants to remove an event handler that was attached with on() function.Help him to select the correct option.","acceptedAnswer":{"@type":"Answer","text":"True"}},{"@type":"Question","name":"John sets an element's CSS position property to its default value and applies jQuery animations. What is the output?","acceptedAnswer":{"@type":"Answer","text":"Animation failed because the CSS position property set to default value, Animation failed because the CSS position property set to static"}},{"@type":"Question","name":"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 ","acceptedAnswer":{"@type":"Answer","text":"True"}},{"@type":"Question","name":"Some users don't want animations to interfere with their web page experience. How can a user turn off animations?","acceptedAnswer":{"@type":"Answer","text":"Use the jQuery method: stop()"}},{"@type":"Question","name":"When referencing an HTML element using jQuery preceded by a # , what JavaScript function is this equivalent to?","acceptedAnswer":{"@type":"Answer","text":"True"}},{"@type":"Question","name":"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?","acceptedAnswer":{"@type":"Answer","text":"True"}}]}
Back to Dashboard

Web Technology

Complete Subject Question Bank

Html#1

Consider the below webpage: Which of the following is used to do this ?

A
True
B
False

HTML provides various elements for structuring and displaying web page content. The specific element depends on the layout type: tables for tabular data, divs for layout, semantic tags for content grouping.

Html#2

If the phone number should accept only 10 digit numbers, which of the following options will suit?

A
True
B
False

To accept only 10-digit phone numbers, use HTML5 input type='tel' with pattern='[0-9]{10}' or implement JavaScript regex validation using /^[0-9]{10}$/.test(value).

Html#3

Ram has designed a portal with 'like' and 'unlike' image buttons that redirect to 'thanks.html'. Which HTML code correctly implements this?

A
<form action="thanks.html"> <input type="submit" src="like.jpg"/> <input type="submit" src="unlike.jpg"/> </form>
B
<form action="thanks.html"> <input type="image" src="like.jpg" alt="submit"/> <input type="image" src="unlike.jpg" alt="submit"/> </form>
C
<form action="thanks.html"> <img href="like.jpg" value="submit"/> <img href="unlike.jpg" value="submit"/> </form>
D
<form action="thanks.html"> <input type="submit"> <img src="like.jpg"/> <img src="unlike.jpg"/> </input> </form>

The correct approach uses <input type="image"> which creates a clickable image submit button. The src attribute specifies the image, and the form action redirects to thanks.html on click.

Html#4

HTML stands for __________

A
True
B
False

HTML stands for HyperText Markup Language. 'HyperText' refers to links connecting pages, and 'Markup Language' refers to the use of tags to annotate content for web browsers.

Html#5

Which element is a container for all the head elements, and may include the document title, scripts, styles, meta information, and more?

A
True
B
False

The HTML <head> element is a container for document metadata and head elements, including the <title>, <link> to stylesheets, <script> tags, <meta> tags, and more.

Html#6

An application that lets you search and see material on the internet is

A
True
B
False

A web browser (e.g., Chrome, Firefox, Safari) is an application used to search for and view content on the internet by fetching and rendering HTML pages.

Javascript#7

Choose the correct JavaScript statement which helps you to write "World of JavaScript" in a web page.

A
write("World of JavaScript")
B
System.out.println("World of JavaScript")
C
document.write("World of JavaScript")
D
println("World of JavaScript")

document.write() is the correct JavaScript method for writing content to the HTML document. System.out.println is Java syntax, and plain write() or println() are not valid browser JavaScript functions.

Javascript#8

Which of the below is the correct syntax for exectuing some code if "amt" is equal to 5000?

A
True
B
False

The correct JavaScript syntax for an equality condition is: if(amt == 5000) { ... }. Using == checks loose equality (value only) while === checks strict equality (value and type).

Javascript#9

Polson needs to extract every character from a text string for email validation. Which JavaScript method is best suited?

A
characterAt()
B
charAt()
C
getCharAt()
D
charCodeAt()

JavaScript's charAt(index) method returns the character at the specified position in a string, making it ideal for iterating through each character for validation.

Javascript#10

Ram's banking website has a 'Check Interest Rates' button that should redirect users to a separate page. Which JavaScript code accomplishes this?

A
location.href = "url"
B
url.newlocation
C
window.redirect("url")
D
document.location("url")

window.location.href (or location.href) is the standard JavaScript property used to redirect the browser to a different URL.

Javascript#11

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>

A
True
B
False

The \D regex matches any non-digit character. Applied globally to "pass 70% fail 30%", it returns all letters, spaces, and symbols. The output will be an array of non-digit characters joined by commas when written to the document.

Javascript#12

What is the output of the below code snippet <script type="text/javascript"> amt=55+"55"; document.write(amt); </script>

A
True
B
False

In JavaScript, when a number is added to a string using +, type coercion converts the number to a string and performs concatenation. So 55 + '55' equals '5555', not 110.

Javascript#13

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 ?

A
True
B
False

The typeof operator in JavaScript returns a string describing the data type of its operand (e.g., 'number', 'string', 'boolean', 'object', 'undefined'). It is used before parseInt() to check the argument type.

Javascript#14

When a user views a page containing a JavaScript program, which machine actually executes the script?

A
True
B
False

Client-side JavaScript is executed by the user's local machine (web browser), not the web server. This enables interactive functionality without requiring round-trips to the server.

Javascript#15

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?

A
True
B
False

Client-side JavaScript running in a browser cannot write files to the server filesystem, access OS-level resources, or directly modify server databases. These operations require server-side code.

Javascript#16

When you want to enclose; some JavaScript statements to an HTML file, which is the correct tag you have to use?

A
True
B
False

JavaScript is embedded in HTML using the <script> tag. It can appear in <head> or <body>, either with inline code or a src attribute pointing to an external .js file.

Javascript#17

Which of the below statements are used to comment a line in JavaScript file?

A
True
B
False

JavaScript supports two comment syntaxes: // for single-line comments and /* ... */ for multi-line block comments. Both are valid for commenting code.

Javascript#18

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?

A
True
B
False

Sita should write the JavaScript greeting code in the onclick event of the button. The onclick event fires when the user clicks the element.

Javascript#19

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

A
True
B
False

document.getElementById('pid1').innerHTML = 'new content' dynamically changes the HTML content inside the paragraph with id='pid1'. This is the standard DOM manipulation approach.

Jquery#20

Rhita wants to replace jQuery's $(document).ready(fun) with an equivalent shorter method.

A
$(fun)
B
#(fun)
C
There is no equivalent function for the given code
D
jQury(fun)

$(fun) is the shorthand for $(document).ready(fun) in jQuery. It executes the provided function once the DOM is fully loaded and ready for manipulation.

Jquery#21

$("#name").remove(); This will remove the text field when you click on the button. State true or false.

A
False
B
True

TRUE — jQuery's .remove() method removes the matched element and all its descendants from the DOM. $('#name').remove() removes the element with id='name'.

Jquery#22

jQuery is a JavaScript Object Notation library

A
True
B
False

FALSE — jQuery is a fast, lightweight JavaScript library for DOM manipulation, event handling, animations, and AJAX. It is NOT related to JSON (JavaScript Object Notation), which is a data serialization format.

Jquery#23

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

A
True
B
False

jQuery's .blur() method attaches an event handler for the blur event, which fires when an element (typically a form field) loses focus. Commonly used for input validation.

Jquery#24

Raju wants to remove an event handler that was attached with on() function.Help him to select the correct option.

A
True
B
False

jQuery's .off() method removes event handlers that were attached with .on(). It is the standard way to unbind events in jQuery.

Jquery#25

John sets an element's CSS position property to its default value and applies jQuery animations. What is the output?

A
Animation failed because the CSS position property set to Fixed
B
Animation failed because the CSS position property set to default value
C
Animation failed because the CSS position property set to static
D
Run the webpage successfully with animated elements

jQuery animations require the CSS position property to be 'relative', 'absolute', or 'fixed'. The default value is 'static', which prevents movement-based animations from working, so both options B and C correctly describe the failure.

Jquery#26

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>

A
True
B
False

jQuery's .empty() method removes all child nodes and content from the selected element while keeping the element itself. Use .remove() to delete the element and its children entirely.

Jquery#27

Some users don't want animations to interfere with their web page experience. How can a user turn off animations?

A
Use the jQuery method: stop()
B
Not possible to turn off the animation by the user
C
Use the jQuery method: stop.animation()
D
Use $.fx.off = true

jQuery's .stop() method stops the currently running animation on the matched elements. Setting $.fx.off = true globally disables all animations, but .stop() is the standard per-element control method.

Jquery#28

When referencing an HTML element using jQuery preceded by a # , what JavaScript function is this equivalent to?

A
True
B
False

TRUE — Using # in jQuery (e.g., ) is the equivalent of document.getElementById("myId") in plain JavaScript. Both select an element by its unique id attribute.

Jquery#29

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?

A
True
B
False

To change a link's color when hovering, modify the CSS 'color' property. This can be done via the CSS :hover pseudo-class or dynamically using jQuery's .css('color', 'red') in a hover event.

Jquery#30

Which of the following is most appropriate tag in html 5 to divide the document into logical document groups?

A
True
B
False

The HTML5 <section> element is the most appropriate tag for dividing a document into logical groups based on thematic content. It is more semantic than a generic <div>.

Jquery#31

The following elements are newly added elements in HTML5: <section> <article> <aside> These elements are called _____________

A
True
B
False

The <section>, <article>, and <aside> elements introduced in HTML5 are called semantic elements. They convey meaning about their content to browsers, developers, and accessibility tools.

Key Topics to Study

Based on our question bank analysis, master these concepts to score high in Web Technology.

HTMLCSSJavaScriptjQueryFormScriptDOMSubmit
Preparation Tip

"Focus on understanding the logic behind pseudocode loops and selection statements, as they form the bulk of technical assessments."