← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 517 · 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 tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
  2. 2.🧭 Which semantic tag holds the main content? (a) <header> (b) <main> (c) <nav> (d) <article>
  3. 3.⚖️ Which selector is the strongest? (a) an id selector (b) an element selector (c) a class selector
  4. 4.💪 Which justify-content value equal gaps, none at ends? (a) space-between (b) flex-end (c) flex-start (d) center
  5. 5.Which of these is the content? (a) the gap to other boxes (b) space outside the border (c) space inside the border (d) the text or picture
  6. 6.🧩 Which language makes a link? (a) HTML (b) CSS (c) JavaScript
  7. 7.💪 Which justify-content value packs boxes at the start? (a) flex-end (b) center (c) space-between (d) flex-start
  8. 8.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  9. 9.🎯 Which CSS selector matches this element?
    <div class="big" id="top">Hello</div>
    (a) span (b) .top (c) .big (d) #intro
  10. 10.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) close it, tell an adult (b) share it with friends (c) click it twice (d) type the password
  11. 11.🌗 Is yellow on black easy or hard to read? (a) easy to read (b) hard to read
  12. 12.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
  13. 13.⚡ What does this code show?
    let name = "Aman";
    console.log("Hi, " + name + "!");
    (a) Hi, Aman! (b) name (c) Aman (d) Hi, name!
  14. 14.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  15. 15.🔗 Which address opens when you click this link?
    <a href="games.html">Play games</a>
    (a) games.html (b) contact.html (c) Play games (d) about.html
  16. 16.📋 Which list tag is an ordered list? (a) <ol> (b) <ul> (c) <li>
  17. 17.True or false: padding is space outside the border. (a) False (b) True
  18. 18.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Kites fly high</p>
  19. 19.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
  20. 20.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to describe the image (d) to make it bigger
  21. 21.Which of these is an opening tag? (a) </h1> (b) </b> (c) <p> (d) </title>
  22. 22.⚡ Which JavaScript word repeats code? (a) for (b) let (c) console.log() (d) if
  23. 23.💪 Which flexbox property sets space between boxes? (a) justify-content (b) display: flex (c) flex-direction (d) gap
  24. 24.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) Here is my best one. (c) All about me (d) Riya’s Recipes
  25. 25.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h6> (d) <h2>
  26. 26.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) ( (d) {
  27. 27.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the title tag (c) the viewport meta tag (d) the hr tag
  28. 28.✍️ What is the selector in this CSS rule?
    h1 {
      border: 2px solid;
      text-align: center;
      font-weight: bold;
    }
    (a) center (b) h1 (c) p (d) border
  29. 29.🌍 Which one scrambles data on its way? (a) the URL (b) the server (c) HTTPS (d) the browser
  30. 30.True or false: <ol> lists things in any order. (a) False (b) True
  31. 31.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h2>? (a) <h6> (b) <h5> (c) <h2> (d) <h1>
  32. 32.True or false: HTML puts a picture on a page. (a) True (b) False
  33. 33.🧭 Which semantic tag holds copyright notes? (a) <header> (b) <footer> (c) <aside> (d) <nav>
  34. 34.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  35. 35.🔁 What does this code print?
    let temp = 43;
    if (temp > 22) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Cool (b) Hot
  36. 36.⚡ Which JavaScript word runs code when true? (a) let (b) for (c) console.log() (d) if
  37. 37.True or false: “colour as the only clue” helps everyone use the page. (a) False (b) True
  38. 38.True or false: in <img>, src tells which image to load. (a) False (b) True
  39. 39.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <p> (d) <ul>
  40. 40.🛡️ Online: is it safe to put secrets in comments? (a) safe (b) not safe

Answer key

  1. <h1>
  2. <main>
  3. an id selector
  4. space-between
  5. the text or picture
  6. HTML
  7. flex-start
  8. in the body
  9. .big
  10. close it, tell an adult
  11. easy to read
  12. on the browser tab
  13. Hi, Aman!
  14. 2
  15. games.html
  16. <ol>
  17. False
  18. 3
  19. 4
  20. to describe the image
  21. <p>
  22. for
  23. gap
  24. Riya’s Recipes
  25. <h6>
  26. <
  27. the viewport meta tag
  28. h1
  29. HTTPS
  30. False
  31. <h1>
  32. True
  33. <footer>
  34. has a closing tag
  35. Hot
  36. if
  37. False
  38. True
  39. <li>
  40. not safe

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