Web Designers Quiz Test Your Knowledge Web Design Fundamentals

Web Designers Quiz: Test Your Knowledge!

Web Designers Quiz: Test Your Knowledge!

Question 1: HTML Document Structure

What element defines the document’s body?

  • A) <head>
  • B) <body>
  • C) <footer>
  • D) <main>

Question 2: CSS Styling

Which property is used to set the background color of an element?

  • A) color
  • B) background-color
  • C) bgcolor
  • D) background-image

Question 3: JavaScript Syntax

How do you create a function in JavaScript?

  • A) function myFunction()
  • B) create myFunction()
  • C) function: myFunction()
  • D) function = myFunction()

Question 4: Responsive Design

Which meta tag is used to make a web page responsive?

  • A) <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
  • B) <meta name=”responsive” content=”true”>
  • C) <meta name=”scale” content=”auto”>
  • D) <meta name=”mobile-first” content=”true”>

Question 5: CSS Flexbox

Which property aligns items in the main axis of a flex container?

  • A) align-items
  • B) justify-content
  • C) align-content
  • D) flex-direction

Question 6: HTML Forms

Which input type defines a slider control?

  • A) slider
  • B) range
  • C) roll
  • D) control

Question 7: JavaScript Data Structures

Which method would you use to remove the last element from an array?

  • A) pop()
  • B) push()
  • C) shift()
  • D) unshift()

Question 8: CSS Selectors

How do you select an element with id “unique”?

  • A) .unique
  • B) #unique
  • C) unique
  • D) *unique

Question 9: HTML Links

How do you open a link in a new tab/window?

  • A) <a href=”url” new>
  • B) <a href=”url” target=”_blank”>
  • C) <a href=”url” target=”new”>
  • D) <a href=”url” open=”new”>

Question 10: JavaScript Events

Which event occurs when the user clicks on an HTML element?

  • A) onmouseover
  • B) onchange
  • C) onclick
  • D) onload

Answers to quiz questions

  • HTML Document Structure
    • Answer: B)
      • The <body> element defines the document’s body.
  • CSS Styling
    • Answer: B) background-color
      • The background-color property is used to set the background color of an element.
  • JavaScript Syntax
    • Answer: A) function myFunction()
      • The correct syntax to create a function in JavaScript is function myFunction().
  • Responsive Design
    • Answer: A)
      • This meta tag is used to make a web page responsive.
  • CSS Flexbox
    • Answer: B) justify-content
      • The justify-content property aligns items in the main axis of a flex container.
  • HTML Forms
    • Answer: B) range
      • The range input type defines a slider control.
  • JavaScript Data Structures
    • Answer: A) pop()
      • The pop() method is used to remove the last element from an array.
  • CSS Selectors
    • Answer: B) #unique
      • The #unique selector is used to select an element with the id “unique”.
  • HTML Links
  • JavaScript Events
    • Answer: C) onclick
      • The onclick event occurs when the user clicks on an HTML element.