← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 925 · 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 attribute of <img> describes the picture? (a) height (b) src (c) alt (d) width
  2. 2.🌈 Which hex code is cyan? (a) #00ffff (b) #ff00ff (c) #000000 (d) #0000ff
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow</p>
  4. 4.🌍 What do we call the computer that stores a website? (a) a mouse (b) a printer (c) a server (d) a keyboard
  5. 5.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 150px;
      justify-content: space-between;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  6. 6.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
  7. 7.What does font-size do? (a) centres a heading (b) sets the letter colour (c) makes letters bigger (d) colours behind the text
  8. 8.🌍 Which program shows a web page to us? (a) a paint program (b) a web browser (c) a music player (d) a calculator
  9. 9.🚀 Which file should this code go in: body { margin: 0; } (a) style.css (b) index.html (c) script.js
  10. 10.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 340px;
      justify-content: space-between;
    }
    Inside are 3 boxes, each 60px wide (no margins).
  11. 11.🌈 Which colour of light is strongest in rgb(96, 166, 67)? (a) red (b) blue (c) green
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
  13. 13.⚖️ Which selector is the weakest? (a) a class selector (b) an id selector (c) an element selector
  14. 14.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 200px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  15. 15.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Our school trip (c) I love mangoes. (d) Rain today
  16. 16.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
  17. 17.🖌️ What colour is behind the letters?
    h2 {
      background-color: yellow;
      color: purple;
      text-align: left;
      font-size: 16px;
    }
    (a) black (b) yellow (c) purple
  18. 18.🔍 Which is the odd one out? (a) changes the page live (b) checks a quiz answer (c) changes the text size (d) counts down a timer
  19. 19.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) Visit the site (b) news.html (c) art.html (d) maths.html
  20. 20.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) magenta (c) yellow (d) red
  21. 21.True or false: <nav> holds the menu of links. (a) True (b) False
  22. 22.🌈 Which hex code is blue? (a) #ffffff (b) #ffff00 (c) #0000ff (d) #ff0000
  23. 23.📋 What number does the browser show next to “Banana”?
    <ol start="2">
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  24. 24.📱 The screen is 1366px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 12px;
      }
    }
    (a) Yes (b) No
  25. 25.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 14px;
      }
    }
  26. 26.True or false: <input> is an empty tag. (a) False (b) True
  27. 27.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  28. 28.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  29. 29.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="50">
    (a) The full moon (b) moon.png (c) bus.jpg (d) fort.jpg
  30. 30.🌍 Which one scrambles data on its way? (a) the URL (b) the server (c) the browser (d) HTTPS
  31. 31.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <p> (c) <title> (d) <meta charset="utf-8">
  32. 32.Which of these is not safe to do online? (a) use a nickname in games (b) ask before downloading (c) share your password (d) use a strong password
  33. 33.⚡ Which JavaScript word repeats code? (a) let (b) console.log() (c) for (d) alert()
  34. 34.🖌️ What colour is behind the letters?
    h1 {
      font-size: 16px;
      background-color: orange;
      color: blue;
      text-align: left;
    }
    (a) green (b) blue (c) orange
  35. 35.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  36. 36.🏷️ Which is the closing tag for <b>? (a) <b/> (b) <\b> (c) </b> (d) <b>
  37. 37.⚡ What does this code show?
    let name = "Kabir";
    alert("Hello, " + name + "!");
    (a) name (b) Hello, Kabir! (c) Kabir (d) Hello, name!
  38. 38.🔢 In a basic web page file, which comes first: “</body>” or “<html>”? (a) <html> (b) </body>
  39. 39.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  40. 40.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Rain today</p> -->

Answer key

  1. alt
  2. #00ffff
  3. 2
  4. a server
  5. 50
  6. a line across the page
  7. makes letters bigger
  8. a web browser
  9. style.css
  10. 80
  11. green
  12. 1
  13. an element selector
  14. 80
  15. Our school trip
  16. <ol>
  17. yellow
  18. changes the text size
  19. maths.html
  20. magenta
  21. True
  22. #0000ff
  23. 5
  24. No
  25. 16
  26. True
  27. in a new tab
  28. <ul>
  29. moon.png
  30. HTTPS
  31. <p>
  32. share your password
  33. for
  34. orange
  35. opens it in a new tab
  36. </b>
  37. Hello, Kabir!
  38. <html>
  39. Yes
  40. 1

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