← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 847 · 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 element does the selector #top style? (a) <h2 class="top"> (b) <h2 id="top"> (c) <h2 id="intro"> (d) <li class="red">
  2. 2.⚡ Which JavaScript word shows a pop-up box? (a) let (b) console.log() (c) if (d) alert()
  3. 3.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  4. 4.🔍 Which is the odd one out? (a) reacts to a button click (b) checks a quiz answer (c) changes the text size (d) shows a pop-up message
  5. 5.🔁 What does this code print?
    let age = 32;
    if (age > 27) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  6. 6.True or false: <ul> lists steps in order. (a) True (b) False
  7. 7.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h5>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
  8. 8.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  9. 9.🌍 What is the domain name in this URL?
    http://school.example.in/art/gallery.html
    (a) www.example.net (b) /art/gallery.html (c) http (d) school.example.in
  10. 10.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  11. 11.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
  12. 12.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) dog.jpg (b) Birthday cake (c) cake.jpg (d) moon.png
  13. 13.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  14. 14.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) <html> (b) </head>
  15. 15.🧭 Is <div> semantic or not semantic? (a) semantic (b) not semantic
  16. 16.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    (a) Cricket is fun. (b) The red kite (c) My pets
  17. 17.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  18. 18.🖌️ What colour are the letters?
    h2 {
      color: orange;
      text-align: right;
      font-size: 28px;
      background-color: black;
    }
    (a) black (b) orange (c) purple
  19. 19.True or false: to tell a trusted adult is not safe. (a) False (b) True
  20. 20.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) All about me (b) index.html (c) My Hobbies (d) Mars is red.
  21. 21.🖌️ How big is the text, in px?
    h1 {
      color: green;
      background-color: blue;
      font-size: 16px;
      text-align: center;
    }
  22. 22.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>Our school trip</h2>
    <h2>The red kite</h2>
    <p>Fun facts</p>
    <h2>My pets</h2>
  23. 23.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No
  24. 24.📋 Which list suits a shopping list in any order? (a) <ul> (b) <ol> (c) <br> (d) <hr>
  25. 25.✍️ Which property is set to 300px in this rule?
    .box {
      border: 2px solid;
      text-align: center;
      width: 300px;
    }
    (a) color (b) 300px (c) width (d) font-style
  26. 26.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) news.html (b) art.html (c) Visit the site (d) maths.html
  27. 27.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
  28. 28.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 290px;
      justify-content: center;
    }
    Inside are 3 boxes, each 50px wide (no margins).
  29. 29.🔁 How many times does this code print “Hi”?
    for (let i = 2; i < 8; i++) {
      console.log("Hi");
    }
  30. 30.🛡️ Online: is it safe to put secrets in comments? (a) not safe (b) safe
  31. 31.🔤 In “HTML”, what does the L stand for? (a) Language (b) Line (c) Link (d) Laptop
  32. 32.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
  33. 33.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) All about me (b) I like to read. (c) Cricket Club (d) index.html
  34. 34.Which colour pair is hard to read? (a) dark grey on white (b) white on dark blue (c) white on black (d) blue on purple
  35. 35.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) { (d) [
  36. 36.💪 Which flexbox property spaces boxes along a row? (a) flex-direction (b) align-items (c) display: flex (d) justify-content
  37. 37.📊 How many rows does this table have?
    <table>
      <tr><td>Banana</td><td>Papaya</td></tr>
      <tr><td>Papaya</td><td>Jamun</td></tr>
    </table>
  38. 38.🖌️ What colour are the letters?
    h1 {
      text-align: center;
      color: green;
      font-size: 36px;
      background-color: orange;
    }
    (a) red (b) orange (c) green
  39. 39.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
  40. 40.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 120px;
      padding: 30px;
      border: 1px solid black;
      margin: 10px;
    }

Answer key

  1. <h2 id="top">
  2. alert()
  3. No
  4. changes the text size
  5. teen
  6. False
  7. <h1>
  8. No
  9. school.example.in
  10. bullets
  11. 1
  12. cake.jpg
  13. has a closing tag
  14. <html>
  15. not semantic
  16. Cricket is fun.
  17. Yes
  18. orange
  19. False
  20. My Hobbies
  21. 16
  22. 2
  23. No
  24. <ul>
  25. width
  26. maths.html
  27. <ul>
  28. 70
  29. 6
  30. not safe
  31. Language
  32. <ul>
  33. Cricket Club
  34. blue on purple
  35. <
  36. justify-content
  37. 2
  38. green
  39. <!--
  40. 202

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