MCQs / Computer Science / NSCT: Web Development

NSCT: Web Development MCQs — Computer Science (page 5)

105 multiple-choice questions on NSCT: Web Development from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.

101. Which method selects the first element matching a CSS selector?

  1. window.alert()
  2. document.querySelector()
  3. document.getElementsByTagName()
  4. document.write()

Answer: B) document.querySelector()

Explanation: querySelectorAll returns all matches. Lesson 6.3 · Web Development

Discuss this question

102. box-sizing: border-box makes the declared width include:

  1. Only the content
  2. Nothing – it hides the element
  3. Content, padding and border
  4. Margin as well

Answer: C) Content, padding and border

Explanation: It simplifies layout calculations. Lesson 6.2 · Web Development

Discuss this question

103. In a RESTful API, which request deletes the student with id 42?

  1. GET /api/deleteStudent?id=42
  2. DELETE /api/students/42
  3. PUT /api/students
  4. POST /api/students/42/remove only

Answer: B) DELETE /api/students/42

Explanation: Use the resource URL with the DELETE method. Lesson 6.4 · Web Development

Discuss this question

104. Google Lighthouse is used to:

  1. Write JavaScript
  2. Host websites
  3. Encrypt traffic
  4. Audit web page performance, accessibility and SEO

Answer: D) Audit web page performance, accessibility and SEO

Explanation: It reports Core Web Vitals. Lesson 6.5 · Web Development

Discuss this question

105. The protocol used by web browsers to request web pages is:

  1. FTP
  2. SNMP
  3. SMTP
  4. HTTP/HTTPS

Answer: D) HTTP/HTTPS

Explanation: HTTP carries web pages; HTTPS adds TLS encryption. Lesson 6.1 · Web Development

Discuss this question

Previous Page 5 of 5

Practise NSCT: Web Development MCQs

More Computer Science chapters