Fresher Drive @ 27 September - HTML, Js

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Alokanibha
A
Alokanibha
Community Contributor
Quizzes Created: 4 | Total Attempts: 387
Questions: 15 | Attempts: 99

SettingsSettingsSettings
Fresher Drive @ 27 September - HTML, Js - Quiz


Questions and Answers
  • 1. 

    Difference b/w confirm and alert

    • A.

      Both are same

    • B.

      Confirm provides choice

    • C.

      Alert provides choice

    • D.

      None

    Correct Answer
    B. Confirm provides choice
    Explanation
    The given answer correctly states that the main difference between confirm and alert is that confirm provides a choice or option to the user, whereas alert does not. Confirm displays a pop-up box with a message and two buttons (usually "OK" and "Cancel") allowing the user to choose between different options. On the other hand, alert only displays a pop-up box with a message and an "OK" button, providing the user with no choice or options.

    Rate this question:

  • 2. 

    Which one is correct?i) function one(var a)ii) function two(a)

    • A.

      Both

    • B.

      I

    • C.

      Ii

    • D.

      None

    Correct Answer
    C. Ii
    Explanation
    The correct answer is ii because "function two(a)" is the correct syntax for defining a function with a parameter named "a". The syntax "function one(var a)" is incorrect because "var" is not necessary when declaring a parameter in JavaScript.

    Rate this question:

  • 3. 

    Selection change event of html radio button

    • A.

      Onselectedindexchanged

    • B.

      Onchange

    • C.

      Onclick

    • D.

      Ondbclick

    Correct Answer
    C. Onclick
    Explanation
    The correct answer is "onclick". This is because the onclick event is triggered when the radio button is clicked by the user. The other options mentioned, such as onselectedindexchanged, onchange, and ondbclick, are not valid events for radio buttons in HTML.

    Rate this question:

  • 4. 

    GetDate() retruns?

    • A.

      Date

    • B.

      Month

    • C.

      Day of month

    • D.

      ALL

    Correct Answer
    C. Day of month
    Explanation
    The getDate() function in JavaScript returns the day of the month from a given date. It extracts the numerical value representing the day from the date object and returns it as an output. This function is commonly used to retrieve the specific day of the month from a date object.

    Rate this question:

  • 5. 

    Is JavaScript case sensitive?

    • A.

      Yes

    • B.

      No

    Correct Answer
    A. Yes
    Explanation
    JavaScript is case sensitive, meaning that it distinguishes between uppercase and lowercase letters. This means that variables and function names must be written with the exact same casing each time they are used. For example, a variable named "myVariable" is not the same as "myvariable" or "MyVariable". Therefore, it is important to be consistent with casing when writing JavaScript code to avoid potential errors or bugs.

    Rate this question:

  • 6. 

    How to create arrays in JavaScript?

    • A.

      Var arr[];

    • B.

      Var arr = new Array();

    • C.

      Var arr[] = new Array();

    • D.

      Var arr = new Array[];

    Correct Answer
    B. Var arr = new Array();
    Explanation
    The correct answer is "var arr = new Array();". This is the correct way to create an array in JavaScript using the Array constructor. The other options are incorrect syntax or invalid ways of creating an array.

    Rate this question:

  • 7. 

    What does "1"+2+4 evaluate to?

    • A.

      15

    • B.

      6

    • C.

      124

    • D.

      51

    Correct Answer
    C. 124
    Explanation
    When the string "1" is added to the number 2, it results in the string "12". Then, when the string "12" is added to the number 4, it concatenates to form the string "124". Therefore, the expression "1"+2+4 evaluates to "124".

    Rate this question:

  • 8. 

    What does 3+4+"7" evaluate to?

    • A.

      347

    • B.

      77

    • C.

      14

    • D.

      None

    Correct Answer
    B. 77
    Explanation
    In this expression, the numbers 3 and 4 are added together, resulting in 7. However, the string "7" is concatenated to the previous result, rather than being added mathematically. Therefore, the final result is "77".

    Rate this question:

  • 9. 

    Iframe in HTML is used to display -- within a web page.

    • A.

      Html control

    • B.

      Html field

    • C.

      A web page

    • D.

      ALL

    Correct Answer
    C. A web page
    Explanation
    The correct answer is "a web page". The iframe element in HTML is used to embed or display content from another web page within the current web page. It allows you to include external content such as videos, maps, or social media feeds seamlessly within your own web page.

    Rate this question:

  • 10. 

    Which of the following is true about links by default?

    • A.

      An unvisited link is underlined and blue.

    • B.

      A visited link is underlined and red.

    • C.

      An active link is underlined and purple.

    • D.

      All the above.

    Correct Answer
    A. An unvisited link is underlined and blue.
    Explanation
    By default, an unvisited link is underlined and blue. This is a common convention in web design to indicate to users that the link has not been clicked on yet. When a user clicks on a link and visits the page, the link becomes a visited link and is typically underlined and red. An active link, on the other hand, is underlined and purple to indicate that the user is currently interacting with it. Therefore, the correct answer is that all of the given statements are true about links by default.

    Rate this question:

  • 11. 

    The href attribute in the link tag specifies the:

    • A.

      Destination of a link.

    • B.

      Link

    • C.

      Hypertext

    • D.

      None of the above

    Correct Answer
    A. Destination of a link.
    Explanation
    The href attribute in the link tag specifies the destination of a link. It is used to define the URL or file path that the link should navigate to when clicked. This attribute is essential for creating clickable links on web pages.

    Rate this question:

  • 12. 

    Which one is correct to assign images path in <img> tag control?

    • A.

      SRC="http://www.computerhope.com/chguy.gif"

    • B.

      Url="http://www.computerhope.com/chguy.gif"

    • C.

      SRCURL="http://www.computerhope.com/chguy.gif"

    • D.

      Imgurl="http://www.computerhope.com/chguy.gif"

    Correct Answer
    A. SRC="http://www.computerhope.com/chguy.gif"
    Explanation
    The correct way to assign image path in the tag control is by using the attribute SRC="http://www.computerhope.com/chguy.gif". This attribute specifies the URL of the image that should be displayed.

    Rate this question:

  • 13. 

    HTML Form Events ___________, fires the moment that the element loses focus.

    • A.

      Onfocus

    • B.

      Onchange

    • C.

      Onlostfocus

    • D.

      Onblur

    Correct Answer
    D. Onblur
    Explanation
    The onblur event in HTML form events is triggered when an element loses focus. This means that when a user clicks outside of the element or tabs away from it, the onblur event is fired. It is commonly used to validate input or perform actions when the user finishes interacting with a specific form element.

    Rate this question:

  • 14. 

    Which of the following tags below are used for a multi-line text input control?

    • A.

      Textml tag

    • B.

      Text tag

    • C.

      Textarea tag

    • D.

      Both b and c above

    Correct Answer
    C. Textarea tag
    Explanation
    The correct answer is the textarea tag. This tag is used for creating a multi-line text input control in HTML. It allows users to enter and edit multiple lines of text. The textml tag and text tag are not valid HTML tags for creating multi-line text input controls.

    Rate this question:

  • 15. 

    What is the difference between XML and HTML?

    • A.

      HTML is used for exchanging data, XML is not.

    • B.

      XML is used for exchanging data, HTML is not.

    • C.

      HTML can have user defined tags, XML cannot

    • D.

      All

    Correct Answer
    B. XML is used for exchanging data, HTML is not.
    Explanation
    XML (Extensible Markup Language) and HTML (Hypertext Markup Language) are both markup languages, but they serve different purposes. HTML is primarily used for creating web pages and displaying content on the internet. It focuses on how the content should be presented to the user, including text formatting, links, images, etc. On the other hand, XML is a flexible language that is used for storing and exchanging structured data. It allows users to define their own tags, making it highly customizable and adaptable to various data formats. Unlike HTML, XML is not concerned with presentation, but rather with the organization and structure of data. Therefore, the correct answer is that XML is used for exchanging data, while HTML is not.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Feb 13, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Sep 26, 2014
    Quiz Created by
    Alokanibha
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.