← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 383 · 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 line is missing its closing tag?
    line 1: <p>Good morning!</p>
    line 2: <h2>Fun facts
    line 3: <i>Our school trip</i>
    (a) line 2 (b) line 1 (c) line 3
  2. 2.True or false: <li> is one item of a list. (a) False (b) True
  3. 3.True or false: HTML on its own can add pictures to a page. (a) False (b) True
  4. 4.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  5. 5.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h3>? (a) <h1> (b) <h3> (c) <h2> (d) <h5>
  6. 6.Which of these is the content? (a) the gap round content (b) the text or picture (c) space inside the border (d) the gap to other boxes
  7. 7.True or false: in <img>, width shows if the image fails. (a) True (b) False
  8. 8.True or false: .big is a class selector. (a) False (b) True
  9. 9.🔁 What does this code print?
    let marks = 40;
    if (marks > 13) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  10. 10.🚀 Which file is best for code that reacts to clicks? (a) notes.txt (b) style.css (c) index.html (d) script.js
  11. 11.🎯 Which sign starts an id selector? (a) . (b) & (c) # (d) @
  12. 12.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <!DOCTYPE html> (c) </html> (d) <html>
  13. 13.🖌️ What colour are the letters?
    h2 {
      background-color: purple;
      font-size: 40px;
      color: blue;
      text-align: left;
    }
    (a) white (b) purple (c) blue
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Fun facts</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
  15. 15.True or false: <tr> makes one table row. (a) False (b) True
  16. 16.⚖️ What colour is the text of this element?
    <p class="red" id="logo">Hi</p>
    CSS:
    #logo { color: green; }
    #logo { color: red; }
    (a) green (b) white (c) red (d) blue
  17. 17.Which of these is a strong password? (a) 111111 (b) Blue@Tiger_74 (c) 123456 (d) riya2014
  18. 18.🔁 When does the else part run? (a) always (b) when if is true (c) never (d) when if is false
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) An old fort (b) width (c) fort.jpg (d) A tiger asleep
  20. 20.True or false: in <img>, width tells which image to load. (a) True (b) False
  21. 21.🖌️ How big is the text, in px?
    p {
      text-align: center;
      background-color: green;
      color: red;
      font-size: 12px;
    }
  22. 22.✍️ What is the selector in this CSS rule?
    .box {
      font-style: italic;
      margin: 10px;
      font-size: 20px;
    }
    (a) h2 (b) .box (c) 10px (d) font-style
  23. 23.Which of these goes in the head? (a) <img> (b) <h1> (c) <a> (d) <style>
  24. 24.⚡ What number does this code print?
    let coins = 27;
    coins = coins + 7;
    coins = coins - 1;
    console.log(coins);
  25. 25.📝 How many <input> tags are in this form?
    <form>
      <input type="date">
      <input type="email">
      <input type="submit" value="Send">
    </form>
  26. 26.🔁 How many times does this code print “Well done”?
    for (let i = 3; i < 5; i++) {
      console.log("Well done");
    }
  27. 27.🛡️ Online: is it safe to download from pop-ups? (a) safe (b) not safe
  28. 28.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h5> or <h3>? (a) <h1> (b) <h2> (c) <h5> (d) <h3>
  29. 29.✍️ How many declarations (property: value pairs) are in this rule?
    h2 {
      background-color: yellow;
      padding: 8px;
    }
  30. 30.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 6; i++) {
      total = total + 2;
    }
    console.log(total);
  31. 31.True or false: #main is an element selector. (a) False (b) True
  32. 32.🌈 In #00b900 the green part is the hex number b9. What is it as a normal number?
  33. 33.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  34. 34.True or false: <p> goes in the head. (a) False (b) True
  35. 35.⚡ Where does console.log() show its output? (a) on the title bar (b) on the printer (c) in the address bar (d) in the console
  36. 36.True or false: <caption> gives the table a title. (a) False (b) True
  37. 37.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 5; i++) {
      total = total + 9;
    }
    console.log(total);
  38. 38.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <p>My pets</p>
    (a) My pets (b) I love mangoes. (c) Hello, world! (d) Rain today
  39. 39.🔗 Where does this link open?
    <a href="games.html" target="_blank">Maths fun</a>
    (a) in a new tab (b) in the same tab
  40. 40.True or false: HTML makes headings and lists. (a) False (b) True

Answer key

  1. line 2
  2. True
  3. True
  4. in the head
  5. <h5>
  6. the text or picture
  7. False
  8. True
  9. Pass
  10. script.js
  11. #
  12. </html>
  13. blue
  14. 1
  15. True
  16. red
  17. Blue@Tiger_74
  18. when if is false
  19. An old fort
  20. False
  21. 12
  22. .box
  23. <style>
  24. 33
  25. 3
  26. 2
  27. not safe
  28. <h1>
  29. 2
  30. 12
  31. False
  32. 185
  33. <ul>
  34. False
  35. in the console
  36. True
  37. 45
  38. Rain today
  39. in a new tab
  40. True

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