← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 465 · 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 colour is rgb(255, 0, 0)? (a) bright green (b) red (c) blue (d) yellow
  2. 2.🔗 Where does this link open?
    <a href="https://example.com">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  3. 3.📊 Which tag makes one table row? (a) <table> (b) <th> (c) <tr> (d) <td>
  4. 4.🔍 Which is the odd one out? (a) lays out the page (b) adds space around boxes (c) changes the page live (d) changes the text size
  5. 5.📦 In the box model, which part is the text or picture? (a) margin (b) padding (c) content (d) border
  6. 6.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  7. 7.💪 Which flexbox property picks row or column? (a) display: flex (b) align-items (c) flex-direction (d) justify-content
  8. 8.🛡️ Is it safe to use the same password on every site? (a) No (b) Yes
  9. 9.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <ul> (d) <hr>
  10. 10.📊 In a table, which tag is a row? (a) <tb> (b) <th> (c) <tr> (d) <td>
  11. 11.💪 Which flexbox property spaces boxes along a row? (a) align-items (b) display: flex (c) justify-content (d) gap
  12. 12.True or false: <ul> goes inside ul or ol. (a) False (b) True
  13. 13.🔁 How many times does this code print “Welcome”?
    for (let i = 2; i < 7; i++) {
      console.log("Welcome");
    }
  14. 14.🧩 Which language counts down a timer? (a) JavaScript (b) HTML (c) CSS
  15. 15.What does justify-content: flex-start do? (a) puts boxes in the middle (b) packs boxes at the start (c) equal gaps, none at ends (d) packs boxes at the end
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <h2>My pets</h2>
    line 2: <small>I love mangoes.
    line 3: <u>The red kite</u>
    (a) line 3 (b) line 2 (c) line 1
  17. 17.🔢 When you open a web page, which comes FIRST? (a) DNS finds the server (b) the browser shows it (c) the browser asks it (d) you type the URL
  18. 18.🔍 One closing tag is missing. Which one?
    <h2>Good morning!</h2>
    <small>Rain today</small>
    <strong>Our school trip
    (a) </h2> (b) </strong> (c) </small> (d) </em>
  19. 19.🔠 Are headings shown in bold by default? (a) Yes (b) No
  20. 20.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 10; i++) {
      total = total + i;
    }
    console.log(total);
  21. 21.True or false: <hr> is an empty tag. (a) True (b) False
  22. 22.Which of these has a closing tag? (a) <input> (b) <hr> (c) <p> (d) <img>
  23. 23.🖌️ Which CSS property makes letters bigger? (a) font-size (b) color (c) background-color (d) text-align
  24. 24.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <img> (c) <table> (d) <ul>
  25. 25.Which of these is true of <nav>? (a) sits at the bottom (b) holds a side box of tips (c) holds one blog post (d) helps you move around
  26. 26.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  27. 27.📝 Which input type hides what you type? (a) number (b) email (c) password (d) text
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) bus.jpg (b) width (c) An old fort (d) Our school bus
  29. 29.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    <p>My pets</p>
  30. 30.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 4; i++) {
      total = total + i;
    }
    console.log(total);
  31. 31.🔁 How many numbers does this code print?
    for (let i = 0; i < 10; i = i + 2) {
      console.log(i);
    }
  32. 32.🔁 How many times does this code print “Well done”?
    for (let i = 1; i <= 5; i++) {
      console.log("Well done");
    }
  33. 33.📊 Where do <td> cells go? (a) inside a <tr> (b) inside the <head> (c) inside a <p> (d) inside a <li>
  34. 34.🎯 Which CSS selector matches this element?
    <h1 class="box" id="hero">Hello</h1>
    (a) .hero (b) #top (c) h2 (d) #hero
  35. 35.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) J (c) Z (d) G
  36. 36.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  37. 37.True or false: <ul> is one item of a list. (a) True (b) False
  38. 38.📝 Which input type lets you tick many? (a) password (b) date (c) number (d) checkbox
  39. 39.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a table (d) a picture
  40. 40.⚖️ Which selector is the weakest? (a) a class selector (b) an id selector (c) an element selector

Answer key

  1. red
  2. in the same tab
  3. <tr>
  4. changes the page live
  5. content
  6. Yes
  7. flex-direction
  8. No
  9. <ul>
  10. <tr>
  11. justify-content
  12. False
  13. 5
  14. JavaScript
  15. packs boxes at the start
  16. line 2
  17. you type the URL
  18. </strong>
  19. Yes
  20. 55
  21. True
  22. <p>
  23. font-size
  24. <meta charset="utf-8">
  25. helps you move around
  26. in the head
  27. password
  28. Our school bus
  29. 3
  30. 10
  31. 5
  32. 5
  33. inside a <tr>
  34. #hero
  35. F
  36. True
  37. False
  38. checkbox
  39. a line across the page
  40. an element selector

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