← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 100 · 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.🖼️ 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
  2. 2.🔠 Are headings shown in bold by default? (a) No (b) Yes
  3. 3.💪 Which flexbox property picks row or column? (a) gap (b) flex-direction (c) align-items (d) display: flex
  4. 4.⚡ Which JavaScript word runs code when true? (a) if (b) let (c) alert() (d) console.log()
  5. 5.⚡ Which JavaScript word repeats code? (a) alert() (b) if (c) for (d) console.log()
  6. 6.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
  7. 7.🖌️ Where does the text sit on its line?
    li {
      color: blue;
      text-align: right;
      font-size: 40px;
      background-color: red;
    }
    (a) on the left (b) in the middle (c) on the right
  8. 8.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Hello, world!</h2>
    <p>Cricket is fun.</p>
  9. 9.🌈 Which hex code is white? (a) #00ffff (b) #ffff00 (c) #00ff00 (d) #ffffff
  10. 10.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  11. 11.🌍 What do we call the computer that stores a website? (a) a printer (b) a server (c) a mouse (d) a keyboard
  12. 12.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) href (b) About us (c) contact.html (d) Play games
  13. 13.♿ Is this heading order correct (no level skipped)?
    <h1> → <h3> → <h4> → <h3>
    (a) Yes (b) No
  14. 14.🔗 Which words do you click on?
    <a href="news.html">Contact us</a>
    (a) href (b) Visit the site (c) Contact us (d) news.html
  15. 15.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  16. 16.📊 How many cells does this table have in all?
    <table>
      <tr><td>Litchi</td><td>Banana</td><td>Orange</td></tr>
      <tr><td>Papaya</td><td>Papaya</td><td>Grapes</td></tr>
      <tr><td>Grapes</td><td>Jamun</td><td>Grapes</td></tr>
      <tr><td>Grapes</td><td>Litchi</td><td>Guava</td></tr>
    </table>
  17. 17.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
  18. 18.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
  19. 19.⚡ Which JavaScript word writes in the console? (a) let (b) alert() (c) console.log() (d) for
  20. 20.True or false: JavaScript counts down a timer. (a) True (b) False
  21. 21.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
  22. 22.What does justify-content: center do? (a) equal gaps, none at ends (b) packs boxes at the start (c) packs boxes at the end (d) puts boxes in the middle
  23. 23.True or false: <footer> holds copyright notes. (a) True (b) False
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <em>Hello, world!
    line 2: <p>Fun facts</p>
    line 3: <small>The red kite</small>
    (a) line 2 (b) line 3 (c) line 1
  25. 25.🎯 Which element does the selector #hero style? (a) <div id="hero"> (b) <div id="top"> (c) <div class="hero"> (d) <span class="star">
  26. 26.🧩 Which language adds space around boxes? (a) CSS (b) HTML (c) JavaScript
  27. 27.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  28. 28.True or false: body { margin: 0; } goes in style.css. (a) True (b) False
  29. 29.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  30. 30.📄 Can HTML on its own make headings? (a) No (b) Yes
  31. 31.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) Maths fun (b) href (c) Visit the site (d) https://example.com
  32. 32.True or false: score = score + 1; goes in index.html. (a) False (b) True
  33. 33.True or false: score = score + 1; goes in script.js. (a) True (b) False
  34. 34.True or false: HTML puts a picture on a page. (a) False (b) True
  35. 35.📄 Which part holds everything you see on the page? (a) the head (b) the body (c) the doctype (d) the title
  36. 36.🔗 Where does this link open?
    <a href="art.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  37. 37.Which of these is the border? (a) the gap round content (b) a solid or dotted edge (c) space inside the border (d) the gap to other boxes
  38. 38.📱 What does a media query check? (a) the battery level (b) the page title (c) the screen width (d) the time of day
  39. 39.🌈 Which hex code is bright green? (a) #00ff00 (b) #000000 (c) #ff00ff (d) #ff0000
  40. 40.True or false: #hero is an element selector. (a) True (b) False

Answer key

  1. to describe the image
  2. Yes
  3. flex-direction
  4. if
  5. for
  6. <li>
  7. on the right
  8. 2
  9. #ffffff
  10. an opening tag
  11. a server
  12. Play games
  13. No
  14. Contact us
  15. No
  16. 12
  17. opens it in a new tab
  18. 3
  19. console.log()
  20. True
  21. 5
  22. puts boxes in the middle
  23. True
  24. line 1
  25. <div id="hero">
  26. CSS
  27. in the head
  28. True
  29. has a closing tag
  30. Yes
  31. Visit the site
  32. False
  33. True
  34. True
  35. the body
  36. in a new tab
  37. a solid or dotted edge
  38. the screen width
  39. #00ff00
  40. False

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