← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 378 · 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.⚡ What does this code show?
    let name = "Aman";
    alert("Welcome, " + name + "!");
    (a) Welcome, name! (b) Aman (c) name (d) Welcome, Aman!
  2. 2.🌍 Which one shows the page to you? (a) HTTPS (b) the URL (c) the server (d) the browser
  3. 3.🚀 Which file should this code go in: <a href="a.html">Go</a> (a) style.css (b) index.html (c) script.js
  4. 4.True or false: a web server sends pages over the net. (a) False (b) True
  5. 5.📊 Which tag holds the whole table? (a) <caption> (b) <table> (c) <td> (d) <th>
  6. 6.🎯 Which element does the selector h2 style? (a) <div class="note"> (b) <h2 class="note"> (c) <span id="top"> (d) <li>
  7. 7.True or false: p is an element selector. (a) True (b) False
  8. 8.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line
  9. 9.🔁 How many times does this code print “Hello”?
    for (let i = 0; i < 3; i++) {
      console.log("Hello");
    }
  10. 10.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Planets (c) My Hobbies (d) Thanks for visiting.
  11. 11.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
  12. 12.🌈 Which colour is #ff0000? (a) bright green (b) white (c) cyan (d) red
  13. 13.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h2> → <h2>
    (a) Yes (b) No
  14. 14.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  15. 15.🌗 Is light grey on white easy or hard to read? (a) easy to read (b) hard to read
  16. 16.🔒 Is the connection to this address scrambled (encrypted)?
    https://www.example.com/news/today.html
    (a) Yes (b) No
  17. 17.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 24px;
      }
    }
  18. 18.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  19. 19.True or false: <aside> holds extra side notes. (a) True (b) False
  20. 20.🌈 Which hex code is magenta? (a) #0000ff (b) #ff0000 (c) #00ffff (d) #ff00ff
  21. 21.🧩 Which language counts down a timer? (a) CSS (b) JavaScript (c) HTML
  22. 22.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
  23. 23.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 170px;
      justify-content: flex-end;
    }
    Inside are 2 boxes, each 60px wide (no margins).
  24. 24.⚖️ What colour is the text of this element?
    <h1 class="note" id="main">Hi</h1>
    CSS:
    h1 { color: blue; }
    h1 { color: green; }
    (a) blue (b) orange (c) green (d) black
  25. 25.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) My Hobbies (b) Try this poha. (c) body (d) Easy snacks
  26. 26.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  27. 27.🌈 In #rrggbb, which colour do the last two digits give? (a) green (b) red (c) white (d) blue
  28. 28.True or false: in <img>, width sets how tall it is. (a) True (b) False
  29. 29.🌈 Which hex code is blue? (a) #0000ff (b) #00ff00 (c) #ff0000 (d) #000000
  30. 30.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
  31. 31.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  32. 32.🌈 Which colour is #00ffff? (a) white (b) cyan (c) blue (d) magenta
  33. 33.Which of these is a strong password? (a) Mango#Kite29! (b) qwerty (c) iloveyou (d) password
  34. 34.🔁 What does i++ do? (a) adds 1 to i (b) takes 1 from i (c) doubles i (d) prints i
  35. 35.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h4>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>
  36. 36.Which of these is true of <main>? (a) sits at the very top (b) holds the main content (c) holds copyright notes (d) holds a side box of tips
  37. 37.True or false: in <img>, width tells which image to load. (a) True (b) False
  38. 38.True or false: HTML on its own cannot make a form. (a) False (b) True
  39. 39.True or false: HTML rounds box corners. (a) True (b) False
  40. 40.💪 Which justify-content value packs boxes at the start? (a) flex-end (b) flex-start (c) space-between (d) center

Answer key

  1. Welcome, Aman!
  2. the browser
  3. index.html
  4. True
  5. <table>
  6. <h2 class="note">
  7. True
  8. starts a new line
  9. 3
  10. My Hobbies
  11. element
  12. red
  13. Yes
  14. No
  15. hard to read
  16. Yes
  17. 20
  18. in the body
  19. True
  20. #ff00ff
  21. JavaScript
  22. <!DOCTYPE html>
  23. 50
  24. green
  25. Easy snacks
  26. opens it in a new tab
  27. blue
  28. False
  29. #0000ff
  30. a web browser
  31. an opening tag
  32. cyan
  33. Mango#Kite29!
  34. adds 1 to i
  35. <h6>
  36. holds the main content
  37. False
  38. False
  39. False
  40. flex-start

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