← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 639 · 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 colour is rgb(0, 255, 0)? (a) cyan (b) bright green (c) blue (d) red
  2. 2.🌐 Which one sends pages over the net? (a) a web server (b) a web browser (c) a code editor
  3. 3.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 26px;
      }
    }
  4. 4.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 15; i = i + 3) {
      console.log(i);
    }
  5. 5.📝 Which tag makes a big box for many lines of text? (a) <input> (b) <br> (c) <p> (d) <textarea>
  6. 6.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) blue (d) white
  7. 7.🔠 Are headings shown in bold by default? (a) Yes (b) No
  8. 8.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
  9. 9.📊 Are <th> cells shown bold and centred by default? (a) No (b) Yes
  10. 10.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 18px;
      }
    }
  11. 11.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ol>
  12. 12.🎯 Which element does the selector #intro style? (a) <li id="main"> (b) <li class="intro"> (c) <div class="note"> (d) <li id="intro">
  13. 13.🌍 Which one is the page’s address? (a) the URL (b) HTTPS (c) the server (d) the browser
  14. 14.Which of these has a closing tag? (a) <input> (b) <p> (c) <img> (d) <hr>
  15. 15.🎯 How many elements on a page should have the same id? (a) 2 (b) 5 (c) 1 (d) any number
  16. 16.⚡ What does this code print? (Look at the quotes!)
    let x = "3";
    let y = 4;
    console.log(x + y);
    (a) 34 (b) 7 (c) Error
  17. 17.♿ Does this help everyone, or make the page harder to use: label every form box? (a) makes it harder (b) helps everyone
  18. 18.🌈 Which colour of light is strongest in rgb(175, 139, 109)? (a) blue (b) green (c) red
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <small>Hello, world!</small>
    line 2: <em>Rain today
    line 3: <p>Cricket is fun.</p>
    (a) line 3 (b) line 1 (c) line 2
  20. 20.Which of these is an opening tag? (a) </h1> (b) </p> (c) </b> (d) <p>
  21. 21.🚀 You change your code. What should you do to see the change? (a) switch off the PC (b) delete the file (c) rename the folder (d) save and refresh
  22. 22.📊 How many rows does this table have?
    <table>
      <tr><td>Jamun</td><td>Orange</td></tr>
      <tr><td>Mango</td><td>Papaya</td></tr>
      <tr><td>Jamun</td><td>Guava</td></tr>
      <tr><td>Litchi</td><td>Banana</td></tr>
    </table>
  23. 23.⚡ Which JavaScript word repeats code? (a) let (b) alert() (c) for (d) if
  24. 24.🌈 Which hex code is blue? (a) #000000 (b) #ff00ff (c) #0000ff (d) #00ffff
  25. 25.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
  26. 26.True or false: in <img>, width tells which image to load. (a) False (b) True
  27. 27.🖌️ What colour are the letters?
    h2 {
      background-color: yellow;
      font-size: 28px;
      text-align: left;
      color: white;
    }
    (a) white (b) black (c) yellow
  28. 28.True or false: <main> holds the logo and title. (a) False (b) True
  29. 29.True or false: <ol> is an ordered list. (a) False (b) True
  30. 30.📝 How many <input> tags are in this form?
    <form>
      <input type="date">
      <input type="password">
      <input type="submit" value="Send">
    </form>
  31. 31.Which colour pair is hard to read? (a) white on dark blue (b) pink on red (c) yellow on black (d) white on black
  32. 32.🚀 Which file should this code go in: #top { color: blue; } (a) index.html (b) style.css (c) script.js
  33. 33.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) src (c) height (d) alt
  34. 34.📱 Responsive design means a page ___. (a) never changes (b) is only for laptops (c) has no pictures (d) fits every screen
  35. 35.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) About us (b) href (c) about.html (d) Play games
  36. 36.🔗 Which words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) Art corner (b) href (c) contact.html (d) Maths fun
  37. 37.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) href (b) About us (c) Play games (d) maths.html
  38. 38.True or false: HTML on its own cannot pick a random number. (a) False (b) True
  39. 39.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    (a) Hello, world! (b) Fun facts (c) I love mangoes.
  40. 40.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Hello, world!</p>
    <h2>My best friend</h2>

Answer key

  1. bright green
  2. a web server
  3. 26
  4. 12
  5. <textarea>
  6. blue
  7. Yes
  8. <img>
  9. Yes
  10. 18
  11. 3
  12. <li id="intro">
  13. the URL
  14. <p>
  15. 1
  16. 34
  17. helps everyone
  18. red
  19. line 2
  20. <p>
  21. save and refresh
  22. 4
  23. for
  24. #0000ff
  25. 1
  26. False
  27. white
  28. False
  29. True
  30. 3
  31. pink on red
  32. style.css
  33. alt
  34. fits every screen
  35. Play games
  36. Maths fun
  37. Play games
  38. True
  39. Hello, world!
  40. 2

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