GROW YOUR SKILLS Quiz: Web Design Fundamentals
Quiz: Web Design Mastery
Question 1: Semantic HTML
Which element is used for the main navigation block in HTML5?
- A) <nav>
- B) <navigation>
- C) <main>
- D) <menu>
Question 2: CSS Flexbox
Which CSS property defines the direction of items in a flex container?
- A) flex-direction
- B) flex-wrap
- C) flex-flow
- D) align-items
Question 3: JavaScript Variables
Which keyword is used to declare a block-scoped variable in JavaScript?
- A) var
- B) let
- C) const
- D) int
Question 4: HTML Links
Which attribute in an <a> tag specifies the URL the link goes to?
- A) src
- B) href
- C) link
- D) destination
Question 5: CSS Positioning
Which value of the position property sets the element’s position relative to its normal position?
- A) absolute
- B) fixed
- C) relative
- D) static
Question 6: JavaScript Arrays
How do you add an item to the end of an array named myArray in JavaScript?
- A) myArray.end(“newItem”);
- B) myArray.add(“newItem”);
- C) myArray.push(“newItem”);
- D) myArray.unshift(“newItem”);
Question 7: Responsive Web Design
What is the purpose of the viewport <meta> tag in HTML?
- A) To disable zooming on mobile devices
- B) To improve the website’s SEO
- C) To define the viewport to scale the website correctly on different devices
- D) To specify the character set of the webpage
Question 8: CSS Preprocessors
Which of the following is a CSS preprocessor?
- A) JavaScript
- B) LESS
- C) HTML
- D) AJAX
Question 9: HTML5 Storage
Which object is used for storing and retrieving data in HTML5?
- A) localStorage
- B) sessionStorage
- C) Both A and B
- D) dataStorage
Question 10: ES6 Features
Which ES6 feature provides a new way to declare functions that can share the this context of the enclosing scope?
- A) Arrow functions
- B) Classes
- C) Promises
- D) Modules
Answers
- Semantic HTML
- Answer: A)
- CSS Flexbox
- Answer: A) flex-direction
- The flex-direction property defines the direction of items in a flex container.
- Answer: A) flex-direction
- JavaScript Variables
- Answer: B) let
- The let keyword is used to declare a block-scoped variable in JavaScript.
- Answer: B) let
- HTML Links
- Answer: B) href
- The href attribute in an <a> tag specifies the URL the link goes to.
- Answer: B) href
- CSS Positioning
- Answer: C) relative
- The relative value of the position property sets the element’s position relative to its normal position.
- Answer: C) relative
- JavaScript Arrays
- Answer: C) myArray.push(“newItem”);
- The push() method is used to add an item to the end of an array.
- Answer: C) myArray.push(“newItem”);
- Responsive Web Design
- Answer: C) To define the viewport to scale the website correctly on different devices
- The viewport <meta> tag is used to define the viewport to make web pages look good on all devices.
- Answer: C) To define the viewport to scale the website correctly on different devices
- CSS Preprocessors
- Answer: B) LESS
- LESS is a CSS preprocessor that extends the capabilities of CSS.
- Answer: B) LESS
- HTML5 Storage
- Answer: C) Both A and B
- Both localStorage and sessionStorage are used for storing and retrieving data in HTML5.
- Answer: C) Both A and B
- ES6 Features
- Answer: A) Arrow functions
- Arrow functions provide a new way to declare functions that can share the this context of the enclosing scope.
- Answer: A) Arrow functions