Question 1: Advanced HTML
Which HTML5 element is specifically designed for embedding rich media such as videos or audio?
- A) <media>
- B) <video>
- C) <embed>
- D) <audio>
- Answer: B) <video>
Question 2: CSS Layouts
Which property is used in CSS to create a layout with multiple columns?
- A) column-count
- B) multi-column
- C) flex-columns
- D) grid-columns
- Answer: A) column-count
Question 3: JavaScript Variables
Which statement about JavaScript variables declared with const is true?
- A) They can be re-assigned new values.
- B) They have block scope.
- C) They are hoisted to the top of their function.
- D) They can store values of any type but must be initialized as objects.
- Answer: B) They have block scope.
Question 4: Responsive Web Design
What is the primary purpose of using media queries in CSS?
- A) To add animations to web pages
- B) To import new CSS files
- C) To adjust styles based on device characteristics
- D) To link to media files
- Answer: C) To adjust styles based on device characteristics
Question 5: CSS Flexbox
What does align-items do in a flex container?
- A) Aligns items horizontally
- B) Distributes space between items
- C) Aligns items vertically along the cross axis
- D) Controls the order of items
- Answer: C) Aligns items vertically along the cross axis
Question 6: HTML Semantic Elements
Which element is best used to group together related elements and sections on a web page?
- A) <div>
- B) <group>
- C) <section>
- D) <block>
- Answer: C) <section>
Question 7: JavaScript Functions
What is a closure in JavaScript?
- A) A function returned by another function
- B) A standalone function
- C) A type of JavaScript variable
- D) A method used to close web applications
- Answer: A) A function returned by another function
Question 8: CSS Preprocessors
Which of the following is a popular CSS preprocessor?
- A) Ruby
- B) LESS
- C) PHP
- D) Java
- Answer: B) LESS
Question 9: HTML Links
How do you make a text link open in a new tab/window?
- A) <a href=”url” target=”_blank”>
- B) <a href=”url” new=”true”>
- C) <link href=”url” target=”_new”>
- D) <a href=”url” open=”new”>
- Answer: A) <a href=”url” target=”_blank”>
Question 10: JavaScript Event Handling
Which method is used to add an event listener in JavaScript?
- A) addEventListener()
- B) onEvent()
- C) attachEvent()
- D) listenEvent()
- Answer: A) addEventListener()