Grade – 10 – Computer Science – Web Development: Advanced Front-End and Back-End – Multiple Choice Questions

Multiple Choice Questions

Web Development: Advanced Front-End and Back-End

Topic: HTML
Grade: 10
Question: Which of the following tags is used to define a table in HTML?
Answer Choices:
A)

B)

C)

D)

Answer: C)

Explanation: The

tag is used to define a table in HTML. It is an essential tag when creating tabular data on a webpage. This tag is used to create the structure of the table, including rows and columns. For example,

data

would create a basic table with one row and one column.

Simple Example:
“`

Cell 1 Cell 2

“`
Complex Example:
“`

Header 1 Header 2
Data 1 Data 2

“`

Topic: CSS
Grade: 10
Question: Which of the following CSS properties is used to control the spacing between individual characters?
Answer Choices:
A) text-decoration
B) letter-spacing
C) text-align
D) line-height

Answer: B) letter-spacing

Explanation: The letter-spacing property in CSS is used to control the spacing between individual characters. It specifies the amount of space that should be added or subtracted between characters in a text. Increasing the value of letter-spacing will increase the space between characters, while decreasing the value will decrease the space. For example, `letter-spacing: 2px;` would add 2 pixels of space between each character.

Simple Example:
“`

Hello

“`
Complex Example:
“`

Hello World

“`

Topic: JavaScript
Grade: 10
Question: What does the \”this\” keyword refer to in JavaScript?
Answer Choices:
A) The current date and time
B) The parent element of the current element
C) The current element being clicked
D) The object that owns the currently executing code

Answer: D) The object that owns the currently executing code

Explanation: In JavaScript, the \”this\” keyword refers to the object that owns the currently executing code. It is a reference to the context in which the code is being executed. The value of \”this\” can change depending on how a function is called. For example, in an object method, \”this\” refers to the object itself. In an event handler function, \”this\” refers to the element that triggered the event.

Simple Example:
“`
const person = {
name: \”John\”,
sayHello: function() {
console.log(\”Hello, my name is \” + this.name);
}
};

person.sayHello();
“`
Complex Example:
“`

“`

Topic: PHP
Grade: 10
Question: What is the output of the following PHP code?

“`

“`

Answer Choices:
A) 15
B) 510
C) 5 + 10
D) $a + $b

Answer: A) 15

Explanation: The PHP code is assigning the value 5 to the variable $a and the value 10 to the variable $b. Then, it adds the values of $a and $b together and assigns the result to the variable $c. Finally, it uses the echo statement to output the value of $c, which is 15.

Simple Example:
“`
$a = 2;
$b = 3;
$c = $a + $b;
echo $c;
“`
Complex Example:
“`
$x = 10;
$y = 20;
$z = $x + $y;
echo \”The sum of \” . $x . \” and \” . $y . \” is \” . $z;
“`

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart
error: Content cannot be copied. it is protected !!
Scroll to Top