← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 252 · 40 questions
TalentJR

Code tip (Read it like a browser): Find the topic: HTML, CSS, JavaScript or how the web works. Read the code line by line, the way a browser would. For sums and loops, write each step down and check it again.

NameDateTime takenScore ___ / 40
  1. 1.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No
  2. 2.True or false: <th> makes a heading cell. (a) True (b) False
  3. 3.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) width (d) src
  4. 4.True or false: to type a password on http is not safe. (a) False (b) True
  5. 5.Which of these is true of <aside>? (a) holds the logo and title (b) holds extra side notes (c) holds a news story (d) holds the menu of links
  6. 6.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  7. 7.🌈 Which colour is #ffff00? (a) black (b) blue (c) yellow (d) cyan
  8. 8.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    (a) Our school trip (b) I love mangoes. (c) Cricket is fun. (d) The red kite
  9. 9.🌈 Which colour is #ff0000? (a) yellow (b) bright green (c) blue (d) red
  10. 10.🏷️ HTML marks up text using ___. (a) tags (b) pixels (c) keys (d) wires
  11. 11.True or false: JavaScript lays out the page. (a) False (b) True
  12. 12.📝 Which input type lets you tick many? (a) email (b) radio (c) password (d) checkbox
  13. 13.🧩 Which language rounds box corners? (a) JavaScript (b) CSS (c) HTML
  14. 14.🔗 Which address opens when you click this link?
    <a href="games.html">Play games</a>
    (a) games.html (b) Play games (c) contact.html (d) about.html
  15. 15.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it makes text red (c) it loads faster (d) it adds pictures
  16. 16.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  17. 17.⚖️ What colour is the text of this element?
    <p class="note" id="top">Hi</p>
    CSS:
    .note { color: purple; }
    p { color: orange; }
    #top { color: yellow; }
    (a) orange (b) purple (c) white (d) yellow
  18. 18.True or false: li is an element selector. (a) True (b) False
  19. 19.🚀 Which file is best for code that reacts to clicks? (a) style.css (b) notes.txt (c) script.js (d) index.html
  20. 20.📦 In the box model, which part is the gap to other boxes? (a) content (b) border (c) padding (d) margin
  21. 21.🔗 Which words do you click on?
    <a href="news.html">Take the quiz</a>
    (a) news.html (b) Take the quiz (c) Play games (d) href
  22. 22.🚀 Should file names have spaces, like my page.html? (a) Yes (b) No
  23. 23.🧭 Which semantic tag holds copyright notes? (a) <aside> (b) <main> (c) <footer> (d) <nav>
  24. 24.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 30px;
      }
    }
  25. 25.True or false: <input type="text"> is for one line of words. (a) True (b) False
  26. 26.⚖️ Which selector is the strongest? (a) a class selector (b) an id selector (c) an element selector
  27. 27.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
  28. 28.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) cake.jpg (b) A happy dog (c) width (d) Birthday cake
  30. 30.🔍 One closing tag is missing. Which one?
    <em>Hello, world!</em>
    <u>Rain today</u>
    <small>Good morning!
    (a) </b> (b) </u> (c) </small> (d) </em>
  31. 31.True or false: <caption> gives the table a title. (a) False (b) True
  32. 32.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>Our school trip</p>
  33. 33.🧩 Which language sets colours and fonts? (a) JavaScript (b) HTML (c) CSS
  34. 34.Which of these is an opening tag? (a) </h1> (b) </p> (c) <b> (d) </b>
  35. 35.⚡ What does this code show?
    let name = "Kabir";
    alert("Well done, " + name + "!");
    (a) name (b) Well done, name! (c) Well done, Kabir! (d) Kabir
  36. 36.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) width (d) alt
  37. 37.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 8px;
      }
    }
    (a) No (b) Yes
  38. 38.🎯 How many elements on a page should have the same id? (a) 2 (b) any number (c) 1 (d) 5
  39. 39.Which of these goes in the head? (a) <table> (b) <p> (c) <meta charset="utf-8"> (d) <h1>
  40. 40.💪 Which justify-content value packs boxes at the start? (a) flex-end (b) space-between (c) flex-start (d) center

Answer key

  1. No
  2. True
  3. src
  4. True
  5. holds extra side notes
  6. numbers
  7. yellow
  8. The red kite
  9. red
  10. tags
  11. False
  12. checkbox
  13. CSS
  14. games.html
  15. it tells its meaning
  16. No
  17. yellow
  18. True
  19. script.js
  20. margin
  21. Take the quiz
  22. No
  23. <footer>
  24. 24
  25. True
  26. an id selector
  27. <h1>
  28. in the body
  29. Birthday cake
  30. </small>
  31. True
  32. 4
  33. CSS
  34. <b>
  35. Well done, Kabir!
  36. src
  37. Yes
  38. 1
  39. <meta charset="utf-8">
  40. flex-start

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids