← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 154 · 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.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h4> or <h2>? (a) <h2> (b) <h4> (c) <h1> (d) <h6>
  2. 2.🔢 When you open a web page, which comes LAST? (a) the browser asks it (b) the server sends files (c) the browser shows it (d) you type the URL
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Rivers flow<br>Roses are red</p>
  4. 4.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
  5. 5.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h3>Rain today</h3>
    <p>Fun facts</p>
  6. 6.Which of these is padding? (a) the gap to other boxes (b) space outside the border (c) space inside the border (d) a solid or dotted edge
  7. 7.🎯 Which element does the selector div style? (a) <span> (b) <div class="note"> (c) <h1 id="main"> (d) <p class="note">
  8. 8.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  9. 9.🔗 Where does this link open?
    <a href="news.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  10. 10.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h5>? (a) <h1> (b) <h2> (c) <h3> (d) <h5>
  11. 11.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
    </ol>
  12. 12.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 270px;
      padding: 15px;
      border: 1px solid black;
      margin: 20px;
    }
  13. 13.True or false: CSS puts a picture on a page. (a) False (b) True
  14. 14.🎯 Which sign starts a class selector? (a) # (b) & (c) . (d) @
  15. 15.🔗 Where does this link open?
    <a href="contact.html" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  16. 16.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Mango</td><td>Mango</td><td>Banana</td></tr>
    </table>
  17. 17.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) white (c) blue (d) cyan
  18. 18.True or false: <table> holds the whole table. (a) False (b) True
  19. 19.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Jamun</td><td>Mango</td></tr>
      <tr><td>Orange</td><td>Mango</td></tr>
    </table>
  20. 20.🔁 How many times does this code print “Well done”?
    for (let i = 0; i < 5; i++) {
      console.log("Well done");
    }
  21. 21.🌈 Which colour is #ffff00? (a) white (b) cyan (c) blue (d) yellow
  22. 22.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 12; i = i + 2) {
      console.log(i);
    }
  23. 23.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h6>? (a) <h6> (b) <h4> (c) <h1> (d) <h5>
  24. 24.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 10px;
      }
    }
  25. 25.🌍 Which one stores the site’s files? (a) HTTPS (b) the URL (c) the server (d) the browser
  26. 26.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  27. 27.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  28. 28.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) A tiger asleep (b) kite.png (c) tiger.jpg (d) map.png
  29. 29.🔁 What does this code print?
    let score = 14;
    if (score < 20) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) Play again (b) You win
  30. 30.💪 Which justify-content value packs boxes at the end? (a) flex-end (b) flex-start (c) center (d) space-between
  31. 31.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Good morning!</p>
    <p>Our school trip</p>
  32. 32.🌍 What is the path in this URL?
    https://learn.example.com/maths/tables.html
    (a) learn.example.com (b) https (c) /index.html (d) /maths/tables.html
  33. 33.🌈 Which colour is rgb(255, 255, 255)? (a) white (b) yellow (c) red (d) blue
  34. 34.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
  35. 35.🌈 Which colour of light is strongest in rgb(127, 94, 217)? (a) red (b) green (c) blue
  36. 36.🔍 Which line is missing its closing tag?
    line 1: <i>Fun facts
    line 2: <strong>I love mangoes.</strong>
    line 3: <em>Our school trip</em>
    (a) line 3 (b) line 2 (c) line 1
  37. 37.📝 Which input type takes only numbers? (a) number (b) text (c) submit (d) date
  38. 38.💪 Which justify-content value packs boxes at the start? (a) flex-start (b) flex-end (c) space-between (d) center
  39. 39.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <h2>I love mangoes.</h2>
    <h2>Cricket is fun.</h2>
    <p>Fun facts</p>
  40. 40.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to describe the image (d) to colour it

Answer key

  1. <h1>
  2. the browser shows it
  3. 3
  4. href
  5. 2
  6. space inside the border
  7. <div class="note">
  8. in the body
  9. in a new tab
  10. <h1>
  11. 2
  12. 342
  13. False
  14. .
  15. in a new tab
  16. 3
  17. black
  18. True
  19. 2
  20. 5
  21. yellow
  22. 10
  23. <h6>
  24. 12
  25. the server
  26. in the head
  27. False
  28. tiger.jpg
  29. You win
  30. flex-end
  31. 1
  32. /maths/tables.html
  33. white
  34. <h6>
  35. blue
  36. line 1
  37. number
  38. flex-start
  39. 3
  40. to describe the image

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