Web Design Essentials Quiz
Question 1: HTML Fundamentals
What does HTML stand for?
- A) Hyper Text Markup Language
- B) High Tech Main Language
- C) Hyperlink Text Main Language
- D) Hyper Tool Markup Language
- Answer: A) Hyper Text Markup Language
Question 2: CSS Basics
Which property is used to change the text color of an element?
- A) text-color
- B) color
- C) font-color
- D) background-color
- Answer: B) color
Question 3: JavaScript Syntax
How do you declare a JavaScript variable?
- A) var name;
- B) variable name;
- C) v name;
- D) let name;
- Answer: A) var name; and D) let name; (Both A and D are correct as ways to declare a variable.)
Question 4: HTML5 Elements
Which element is used to represent the navigation links section?
- A) <nav>
- B) <links>
- C) <navigate>
- D) <navbar>
- Answer: A) <nav>
Question 5: CSS Positioning
Which CSS property is used to position an element in relation to the viewport?
- A) position: absolute;
- B) position: fixed;
- C) position: relative;
- D) position: static;
- Answer: B) position: fixed;
Question 6: JavaScript Functions
What is the correct syntax for calling a function named “myFunction”?
- A) call myFunction();
- B) call function myFunction();
- C) myFunction();
- D) execute myFunction();
- Answer: C) myFunction();
Question 7: Responsive Web Design
Which meta tag is essential for making a website mobile-friendly?
- A) <meta name=”responsive” content=”true”>
- B) <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
- C) <meta name=”mobile” content=”yes”>
- D) <meta name=”scale” content=”no”>
- Answer: B) <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
Question 8: CSS Flexbox
To center children horizontally in a flex container, which properties should be used?
- A) justify-content: center;
- B) align-items: center;
- C) align-content: center;
- D) justify-items: center;
- Answer: A) justify-content: center;
Question 9: HTML Links
How do you create a link that opens in a new tab?
- A) <a href=”url” target=”_blank”>
- B) <a href=”url” new=”true”>
- C) <a href=”url” target=”new”>
- D) <a href=”url” open=”newTab”>
- Answer: A) <a href=”url” target=”_blank”>
Question 10: JavaScript Arrays
How can you add a new item to an array named “myArray”?
- A) myArray.push(“newItem”);
- B) myArray.add(“newItem”);
- C) myArray.newItem(“add”);
- D) add.myArray(“newItem”);
- Answer: A) myArray.push(“newItem”);