← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 525 · 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.🔍 One closing tag is missing. Which one?
    <p>Rain today</p>
    <h2>My best friend</h2>
    <strong>Fun facts
    (a) </p> (b) </h2> (c) </h1> (d) </strong>
  2. 2.💪 Which justify-content value puts boxes in the middle? (a) center (b) flex-end (c) space-between (d) flex-start
  3. 3.🎯 Which CSS selector matches this element?
    <h1 class="big" id="intro">Hello</h1>
    (a) #main (b) .intro (c) #intro (d) h2
  4. 4.What is <input type="checkbox"> for? (a) lets you tick many (b) takes only numbers (c) hides what you type (d) picks a day
  5. 5.♿ Does this help everyone, or make the page harder to use: add alt text to images? (a) helps everyone (b) makes it harder
  6. 6.True or false: a web server shows pages from the web. (a) True (b) False
  7. 7.🔍 One closing tag is missing. Which one?
    <h3>Rain today
    <b>Fun facts</b>
    <small>Hello, world!</small>
    (a) </b> (b) </h3> (c) </strong> (d) </small>
  8. 8.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  9. 9.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
  10. 10.⚖️ What colour is the text of this element?
    <h2 class="box" id="hero">Hi</h2>
    CSS:
    #hero { color: green; }
    #hero { color: red; }
    (a) black (b) purple (c) green (d) red
  11. 11.🚀 Which file should this code go in: console.log(5 + 2); (a) style.css (b) index.html (c) script.js
  12. 12.📊 Which tag holds the whole table? (a) <tr> (b) <table> (c) <th> (d) <td>
  13. 13.🌐 Which one turns HTML into a page? (a) a web server (b) a web browser (c) a code editor
  14. 14.🔍 Which is the odd one out? (a) changes the page live (b) shows a pop-up message (c) checks a quiz answer (d) puts a picture on a page
  15. 15.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) height (d) alt
  16. 16.🔁 What does this code print?
    let age = 25;
    if (age < 25) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) child (b) teen
  17. 17.🎯 Which CSS selector matches this element?
    <li class="star" id="main">Hello</li>
    (a) .menu (b) #logo (c) .main (d) #main
  18. 18.🖌️ What colour are the letters?
    h1 {
      font-size: 16px;
      color: yellow;
      text-align: left;
      background-color: black;
    }
    (a) black (b) blue (c) yellow
  19. 19.📝 Which tag gives a form box a name you can click? (a) <h1> (b) <hr> (c) <title> (d) <label>
  20. 20.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
  21. 21.🚀 Which file is best for the colours and fonts? (a) index.html (b) style.css (c) script.js (d) photo.jpg
  22. 22.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  23. 23.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="200">
  24. 24.♿ Is this heading order correct (no level skipped)?
    <h1> → <h1> → <h2> → <h3>
    (a) Yes (b) No
  25. 25.🔁 Which word runs code only when something is true? (a) for (b) log (c) if (d) let
  26. 26.✍️ In color: blue; which part is the property? (a) blue (b) : (c) color (d) ;
  27. 27.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <!-- <p>My pets</p> -->
  28. 28.🏷️ Which is the closing tag for <b>? (a) <b> (b) </b> (c) <b/> (d) <\b>
  29. 29.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 190px;
      justify-content: flex-end;
    }
    Inside are 4 boxes, each 40px wide (no margins).
  30. 30.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  31. 31.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) href (b) Play games (c) about.html (d) About us
  32. 32.🔗 Which address opens when you click this link?
    <a href="contact.html">School news</a>
    (a) School news (b) maths.html (c) https://example.com (d) contact.html
  33. 33.🌍 What is the protocol in this URL?
    https://school.example.in/maths/tables.html
    (a) https (b) /maths/tables.html (c) http (d) school.example.in
  34. 34.Which of these does HTML do? (a) reacts to a button click (b) counts down a timer (c) makes a link (d) checks a quiz answer
  35. 35.What is <input type="submit"> for? (a) is for an email address (b) sends the form (c) lets you pick only one (d) is for one line of words
  36. 36.🚀 You change your code. What should you do to see the change? (a) save and refresh (b) delete the file (c) rename the folder (d) switch off the PC
  37. 37.True or false: in <img>, src tells which image to load. (a) False (b) True
  38. 38.True or false: <th> makes a heading cell. (a) True (b) False
  39. 39.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 20px;
      }
    }
  40. 40.🎯 Which CSS selector matches this element?
    <span class="menu" id="top">Hello</span>
    (a) p (b) #menu (c) #intro (d) #top

Answer key

  1. </strong>
  2. center
  3. #intro
  4. lets you tick many
  5. helps everyone
  6. False
  7. </h3>
  8. Yes
  9. on the browser tab
  10. red
  11. script.js
  12. <table>
  13. a web browser
  14. puts a picture on a page
  15. height
  16. child
  17. #main
  18. yellow
  19. <label>
  20. easy to read
  21. style.css
  22. <a>
  23. 200
  24. Yes
  25. if
  26. color
  27. 2
  28. </b>
  29. 30
  30. an opening tag
  31. Play games
  32. contact.html
  33. https
  34. makes a link
  35. sends the form
  36. save and refresh
  37. True
  38. True
  39. 12
  40. #top

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