← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 532 · 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.True or false: #main is an id selector. (a) False (b) True
  2. 2.🔗 Which words do you click on?
    <a href="maths.html">Visit the site</a>
    (a) href (b) Visit the site (c) maths.html (d) Maths fun
  3. 3.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) tiger.jpg (b) kite.png (c) map.png (d) A tiger asleep
  4. 4.🌍 What is the protocol in this URL?
    https://kids.example.org/index.html
    (a) kids.example.org (b) /index.html (c) http (d) https
  5. 5.What does background-color do? (a) makes letters bigger (b) sets the letter colour (c) picks the font style (d) colours behind the text
  6. 6.Which of these goes in the body? (a) <style> (b) <title> (c) <link rel="stylesheet"> (d) <p>
  7. 7.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  8. 8.🔍 One closing tag is missing. Which one?
    <h1>My pets</h1>
    <i>Hello, world!</i>
    <b>The red kite
    (a) </strong> (b) </i> (c) </h1> (d) </b>
  9. 9.💪 Which justify-content value packs boxes at the end? (a) flex-start (b) center (c) flex-end (d) space-between
  10. 10.🔒 Is the connection to this address scrambled (encrypted)?
    https://kids.example.org/games/chess.html
    (a) Yes (b) No
  11. 11.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  12. 12.Which of these does HTML do? (a) rounds box corners (b) makes a form box (c) lays out the page (d) reacts to a button click
  13. 13.⚡ What number does this code print?
    let runs = 15;
    runs = runs + 20;
    runs = runs - 11;
    console.log(runs);
  14. 14.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the server (c) only the printer (d) nobody
  15. 15.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  16. 16.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <h1> (d) <link rel="stylesheet">
  17. 17.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <p>Rain today</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Fun facts (b) Cricket is fun. (c) I love mangoes. (d) Rain today
  18. 18.🔍 Which is the odd one out? (a) lays out the page (b) checks a quiz answer (c) sets colours and fonts (d) adds space around boxes
  19. 19.True or false: <meta> has a closing tag. (a) False (b) True
  20. 20.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  21. 21.True or false: <table> gives the table a title. (a) True (b) False
  22. 22.⚖️ What colour is the text of this element?
    <h1 class="menu" id="main">Hi</h1>
    CSS:
    .menu { color: white; }
    #main { color: orange; }
    h1 { color: green; }
    (a) green (b) yellow (c) white (d) orange
  23. 23.Which of these is the border? (a) the gap round content (b) space inside the border (c) the text or picture (d) the line round the box
  24. 24.🔁 How many times does this code print “Well done”?
    for (let i = 3; i <= 8; i++) {
      console.log("Well done");
    }
  25. 25.📝 How many <input> tags are in this form?
    <form>
      <input type="date">
      <input type="email">
      <input type="text">
      <input type="submit" value="Send">
    </form>
  26. 26.📦 In the box model, which part is the gap round content? (a) border (b) margin (c) padding (d) content
  27. 27.🔢 To build and share your first web page, which comes FIRST? (a) add CSS styles (b) test in a browser (c) plan what to show (d) write the HTML
  28. 28.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  29. 29.True or false: <h1>My Site</h1> goes in style.css. (a) False (b) True
  30. 30.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Jamun</td><td>Grapes</td><td>Guava</td></tr>
      <tr><td>Orange</td><td>Banana</td><td>Papaya</td></tr>
    </table>
  31. 31.True or false: <li> is one item of a list. (a) False (b) True
  32. 32.🎨 One CSS file can style how many pages? (a) only one image (b) many pages (c) no pages (d) only one word
  33. 33.🎯 Which CSS selector matches this element?
    <li class="menu" id="main">Hello</li>
    (a) .main (b) .note (c) li (d) #menu
  34. 34.📊 How many rows does this table have?
    <table>
      <tr><td>Jamun</td><td>Banana</td><td>Guava</td><td>Banana</td></tr>
      <tr><td>Orange</td><td>Orange</td><td>Banana</td><td>Orange</td></tr>
    </table>
  35. 35.🎯 How many elements on a page should have the same id? (a) 1 (b) 5 (c) 2 (d) any number
  36. 36.True or false: .big is a class selector. (a) True (b) False
  37. 37.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
  38. 38.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
  39. 39.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Orange</td><td>Jamun</td><td>Litchi</td><td>Grapes</td></tr>
      <tr><td>Mango</td><td>Jamun</td><td>Grapes</td><td>Banana</td></tr>
    </table>
  40. 40.⚡ What number does this code print?
    let score = 7;
    score = score + 4;
    score = score - 4;
    console.log(score);

Answer key

  1. True
  2. Visit the site
  3. tiger.jpg
  4. https
  5. colours behind the text
  6. <p>
  7. Yes
  8. </b>
  9. flex-end
  10. Yes
  11. <a>
  12. makes a form box
  13. 24
  14. screen-reader users
  15. True
  16. <h1>
  17. Cricket is fun.
  18. checks a quiz answer
  19. False
  20. an opening tag
  21. False
  22. orange
  23. the line round the box
  24. 6
  25. 4
  26. padding
  27. plan what to show
  28. in a new tab
  29. False
  30. 9
  31. True
  32. many pages
  33. li
  34. 2
  35. 1
  36. True
  37. starts a new line
  38. <!--
  39. 12
  40. 7

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