Set-1

 

1.  Which image format is best suited for photographs and images with gradients due to its ability to handle millions of colors and efficient compression?

A)  PNG

B)  GIF

C)  JPG/JPEG

D)  PSD

2.  Which image format supports transparency and is commonly used for web graphics and images with transparent backgrounds?

A) PSD

(B) PNG

C)  JPG

D)  GIF

3.  What file extension is commonly associated with Photoshop plug-in files?

A)  .exe

B)  .dll

C)  .8bf

D)  .psd

4.  What is the function of a layer mask?

A)  To change the color of a layer

B)  To hide or reveal parts of a layer

C)  To increase the layer's opacity

D)  To duplicate a layer

5.  What is a Smart Object?

A)  A rasterized layer

B)  A Layer that can edited non destructively

C)  A text layer

D)  A layer without transparency

6.  How do you display output in JavaScript?

A)  Using print()

B)  Using alert()

C)  Using console.log()

D)  Using document.write()


7.  What are single-line and multi-line comments in JavaScript? How do you comment out code?

A)  for single-line, /* */ for multi-line

B)  <!--> for single-line, <!--- > for multi-line

C)  # for single-line, """ """ for multi-line

D)  // for single-line, /**/for multi-line

8.  Select the basic data types in JavaScript

A)  Number, String, Boolean, Object, Array

B)  Number, String, Boolean, Undefined, Null, Object

C)  Integer, Float, String, Boolean, Object

D)  Char, String, Boolean, Object, Array

9.  How do you check the data type of a variable in JavaScript?

A)  typeof variable

B)  instanceof variable

C)  variable.type

D)  checkType(variable)

10.   What are arithmetic operators in JavaScript? Provide examples.

A) +,-,*,/

B) +, -, *, /, &&, ||

C) ++,--, +=, -=

D) ===,====, !=, !=

11. Which keyword is used to declare a variable in JavaScript?

a)  var

b)  variable

c)  v

d)  let

12.  Which operator is used for strict equality comparison in JavaScript?

a) ==

b)  != c)=== d) !==


13.  Which function is used to output data to the console in JavaScript?

a)  print()

b)  log()

c)  display()

d console.log()

14.  Which built-in method is used to convert a string to an integer in JavaScript?

a)  parseInt()

b)  toInteger()

c)  convertToInt()

d)  stringToInt()

15.  What does the method querySelector() do in JavaScript?

a) It selects multiple elements based on a class name.

(b) It selects the first element based on a CSS selector.

c)  It selects an element based on its ID.

d)  It selects all elements of a specific tag name.

 

16.  What are data types in JavaScript? Give examples:

Ans: Data types define the kind of data. Examples: String, Number, Boolean, Null, Undefined, Object.

 

 

 

 

 

17.  How does an interactive website differ from static and dynamic websites?

 

Ans: Interactive websites respond to user actions (e.g., clicks, forms). Static sites show fixed content. Dynamic sites fetch/update content from servers.

 

 

 

 

18.  Which code editor do you prefer for web design and development projects, and why?

 

Ans: Visual Studio Code – It's fast, supports extensions, syntax highlighting, Git, and debugging.

 

 

 

 

19.  Can you explain the basic purpose of FTP (File Transfer Protocol) software in web development?

Ans: FTP is used to upload/download website files between a local computer and a web server.


20.  How do you create an HTML login form with a submit button?

<form>

<input type="text" placeholder="Username">

<input type="password" placeholder="Password">

<button type="submit">Login</button>


21.  When should I consider using SVG images?


</form>


 

Ans: Use SVG for icons, logos, and illustrations that need to scale without losing quality.

 

 

 

 

22.  What is an ID selector in CSS?

Ans: An ID selector targets a specific element with a unique id. Syntax: #idName { ... }

 

 

23.  How do you apply multiple CSS classes to a single HTML element?

 

Ans: Separate class names with spaces:

 

html Copy Edit

<div class="box red large"></div>

24.  How do you create functions in JavaScript?

 

Ans:

function greet(name) { return "Hello, " + name;

}

 

 

 

 

 

 

25.  How do you create an ordered list in HTML?

 

Ans:

<ol>

<li>Item 1</li>

<li>Item 2</li>

</ol>


 

 

 

26.  What are arrays and objects in JavaScript?

 

Ans: Array: List of values – let colors = ["red", "green"];

 

Object: Key-value pairs – let person = { name: "Alex", age: 25 };

 

 

 

27.  What is the purpose of the setTimeout() and setInterval() functions in JavaScript?

 

Ans: setTimeout() runs code after a delay once. setInterval() runs code repeatedly at intervals.

 

28.  Explain the difference between for loop, while loop, and do-while loop:

 

Ans: for: Best for known number of iterations. while: Runs while condition is true.

do-while: Runs at least once, then checks condition.

 

 

 

 

 

29.  How do you handle conditional statements in JavaScript?

 

Ans: Use if, else if, and else:

 

javascript Copy Edit

if (score > 90) { ... } else { ... }

 

 

30.  What is the Document Object Model (DOM) in JavaScript?

 

Ans: The DOM is a tree-like structure of the HTML page that JavaScript can use to read and change content, structure, and styles.

Post a Comment

Previous Post Next Post