NEW
Font size
WorksheetsWEBZEN MCQ
Total questions: 25
Worksheet time: 10mins
What is the correct way to add an image to a webpage using HTML?
<image src="image.jpg">
<img src="image.jpg">
<image href="image.jpg">
<img href="image.jpg">
Which tag is used to define a hyperlink in HTML?
<a>
<link>
<href>
<hyperlink>
Which attribute is used to specify the alternative text for an image in HTML?
alt
text
src
title
Which tag is used to define a section in a webpage that contains navigation links?
<nav>
<section>
<header>
<links>
What is the purpose of the <meta> tag in HTML?
To define metadata about an HTML document
To create a clickable link
To insert a video
To define a paragraph of text
Which tag is used to create a dropdown list in HTML?
<select>
<list>
<dropdown>
<options>
How can you add a background color to an HTML element?
background-color: red;
color: background red;
bgcolor: red;
color: red;
Which tag is used to define a clickable button in a form in HTML?
<input>
<button>
<submit>
<clickable>
What does CSS stand for?
Cascading Style Sheets
Creative Style Sheets
Computer Style Sheets
Colorful Style Sheets
How do you select an element with id "myElement" in CSS?
#myElement
.myElement
element.myElement
id:myElement
Which property is used to change the font size of text in CSS?
font-size
text-size
font-style
size
How do you make text bold in CSS?
font-weight: bold;
bold: true;
style: bold;
text-weight: bold;
What is the default value of the display property in CSS?
block
inline
none
inline-block
How do you center an element horizontally in CSS?
margin: auto;
text-align: center;
align: center;
horizontal-align: center;
What does the z-index property in CSS control?
Element's position on the z-axis
Element's visibility
Element's size
Element's opacity
What will be the output of the following javascript code?
console.log(typeof NaN);
number
NaN
undefined
string
Which of the following is a valid way to create an object for a class in JavaScript?
var obj = {};
var obj = new Object();
var obj = Object.create({});
var obj = {key: value};
What will be the output of the following javascript code?
console.log(0.1 + 0.2 === 0.3);
true
false
Which of the following statements about arrow functions in JavaScript is true?
Arrow functions do not have their own `this` context.
Arrow functions cannot have multiple parameters.
Arrow functions always have a `return` statement.
Arrow functions cannot be used as methods in objects.
What does the `map()` method do in JavaScript?
Modifies the original array
Creates a new array with the results of calling a provided function on every element in the array
Removes the first element from an array and returns it
Returns the index of the first element in an array that satisfies a provided testing function
What will be the output of the following code?
console.log(5 + '5');
55
"55"
10
"10"
What is the purpose of the `splice()` method in JavaScript?
Adds one or more elements to the beginning of an array.
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
Returns the first element that matches a specified condition.
Returns a new array containing the results of calling a provided function on every element in the array
Which of the following is true about the `let` keyword in JavaScript?
Variables declared with `let` are hoisted to the top of their scope.
Variables declared with `let` cannot be reassigned.
Variables declared with `let` have block scope.
Variables declared with `let` are scoped to the function in which they are declared.
Which property is used to define the HTML content to an HTML element with a specific id?
innerText
innerContent
elementText
innerHTML
What is the difference between `==` and `===` in JavaScript?
`==` compares the values of two variables, while `===` compares both the values and the types.
`==` always returns true, while `===` returns false if the values are not equal.
`==` performs a deep comparison of objects, while `===` only compares their references.
`==` is used for assignment, while `===` is used for comparison.
