Html, css, JavaScript: 17 MCQs with answers

All 17 multiple-choice questions from this kit, free and with no sign-up.

Warm-up · 6 questions

Q1. What is the primary role of HTML in a web page?

Beginner
Show answer & explanation

—

Q2. How does CSS enhance the presentation of a web page beyond what HTML provides?

Beginner
Show answer & explanation

—

Q3. What is the function of JavaScript in a web browser?

Beginner
Show answer & explanation

—

Q4. Describe how an external CSS file is linked to an HTML document.

Beginner
Show answer & explanation

—

Q5. What is the purpose of the `alt` attribute in an HTML `<img>` tag?

Beginner
Show answer & explanation

—

Q6. How does the HTML `<meta>` tag contribute to web development?

Beginner
Show answer & explanation

—

Building up · 11 questions

Q7. Explain the concept of 'separation of concerns' as it applies to HTML, CSS, and JavaScript.

Intermediate
Show answer & explanation

—

Q8. What is the DOM, and how does JavaScript interact with it?

Intermediate
Show answer & explanation

—

Q9. How does an external JavaScript file get included in an HTML page, and what is the effect of the `defer` attribute?

Intermediate
Show answer & explanation

—

Q10. What is the difference between inline, internal, and external CSS?

Intermediate
Show answer & explanation

—

Q11. Give an example of how JavaScript can respond to a user event, such as a button click.

Intermediate
Show answer & explanation

—

Q12. Explain the concept of CSS specificity and why it matters.

Intermediate
Show answer & explanation

—

Q13. How does JavaScript's `document.querySelector()` method differ from `document.getElementById()`?

Intermediate
Show answer & explanation

—

Q14. Describe the box model in CSS and its components.

Intermediate
Show answer & explanation

—

Q15. What is the difference between `let`, `const`, and `var` in JavaScript?

Intermediate
Show answer & explanation

—

Q16. Explain the purpose of the `display: flex` property in CSS.

Intermediate
Show answer & explanation

—

Q17. What is an event in JavaScript, and how can you prevent its default behavior?

Intermediate
Show answer & explanation

—

Make your own

Your notes can be a kit like these

Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free, in 42 languages.

  • Chapter notes
  • Flashcards
  • Practice MCQs
  • Scored tests
  • Exam prep

Get Veda free See what students get

Free to start · No ads · Works in 42 languages