← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 228 · 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.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
  2. 2.True or false: body { margin: 0; } goes in style.css. (a) False (b) True
  3. 3.🛡️ Online: is it safe to use a nickname in games? (a) safe (b) not safe
  4. 4.True or false: #main is an id selector. (a) False (b) True
  5. 5.⚖️ What colour is the text of this element?
    <h2 class="big" id="intro">Hi</h2>
    CSS:
    .big { color: blue; }
    .big { color: red; }
    (a) green (b) purple (c) blue (d) red
  6. 6.🔢 To build and share your first web page, which comes FIRST? (a) plan what to show (b) add CSS styles (c) test in a browser (d) write the HTML
  7. 7.🌗 Is dark grey on white easy or hard to read? (a) easy to read (b) hard to read
  8. 8.🎨 One CSS file can style how many pages? (a) only one image (b) only one word (c) many pages (d) no pages
  9. 9.🌍 What is the path in this URL?
    https://www.example.net/games/chess.html
    (a) https (b) www.example.net (c) /games/chess.html (d) /about.html
  10. 10.🖌️ Which CSS property makes letters bigger? (a) color (b) font-weight (c) font-size (d) background-color
  11. 11.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h6> or <h3>? (a) <h3> (b) <h1> (c) <h6> (d) <h5>
  12. 12.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 260px;
      justify-content: space-between;
    }
    Inside are 4 boxes, each 50px wide (no margins).
  13. 13.✍️ Which sign goes between a property and its value? (a) : (b) - (c) = (d) ;
  14. 14.True or false: <h1>My Site</h1> goes in script.js. (a) False (b) True
  15. 15.🚀 Which file is best for code that reacts to clicks? (a) style.css (b) index.html (c) notes.txt (d) script.js
  16. 16.🔁 What does this code print?
    let temp = 34;
    if (temp > 24) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Cool (b) Hot
  17. 17.🔐 Is S0lar!Pen#8 a strong or a weak password? (a) weak (b) strong
  18. 18.⚖️ What colour is the text of this element?
    <p class="note" id="top">Hi</p>
    CSS:
    .note { color: blue; }
    p { color: green; }
    #top { color: red; }
    (a) blue (b) orange (c) red (d) green
  19. 19.Which of these is an opening tag? (a) </title> (b) </li> (c) <p> (d) </b>
  20. 20.💪 Which justify-content value puts boxes in the middle? (a) flex-start (b) space-between (c) flex-end (d) center
  21. 21.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ol>
  22. 22.🌗 Is white on black easy or hard to read? (a) easy to read (b) hard to read
  23. 23.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the title tag (c) the viewport meta tag (d) the hr tag
  24. 24.Which of these is safe to do online? (a) meet an online stranger (b) share your password (c) log out on shared PCs (d) post your home address
  25. 25.Which of these does JavaScript do? (a) changes the text size (b) puts a picture on a page (c) gives the page structure (d) shows a pop-up message
  26. 26.True or false: <ul> goes in the body. (a) False (b) True
  27. 27.🔢 When you open a web page, which comes FIRST? (a) the browser shows it (b) you type the URL (c) the server sends files (d) DNS finds the server
  28. 28.🔍 Which is the odd one out? (a) rounds box corners (b) adds space around boxes (c) sets colours and fonts (d) changes the page live
  29. 29.🛡️ Should you share your password with your best friend? (a) No (b) Yes
  30. 30.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  31. 31.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) element (d) attribute
  32. 32.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 280px;
      justify-content: space-between;
    }
    Inside are 3 boxes, each 60px wide (no margins).
  33. 33.Which of these is an opening tag? (a) </li> (b) <b> (c) </p> (d) </b>
  34. 34.💪 Which flexbox property spaces boxes along a row? (a) gap (b) justify-content (c) display: flex (d) flex-direction
  35. 35.🚀 Which file should this code go in: <img src="cat.png"> (a) script.js (b) style.css (c) index.html
  36. 36.True or false: <ul><li>Art</li></ul> goes in script.js. (a) False (b) True
  37. 37.🎯 Which element does the selector .red style? (a) <span id="red"> (b) <span class="box"> (c) <span class="red"> (d) <p class="star">
  38. 38.True or false: a code editor is where we type code. (a) False (b) True
  39. 39.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
  40. 40.🔍 One closing tag is missing. Which one?
    <em>Good morning!</em>
    <h2>I love mangoes.
    <small>My pets</small>
    (a) </small> (b) </h2> (c) </p> (d) </em>

Answer key

  1. an attribute
  2. True
  3. safe
  4. True
  5. red
  6. plan what to show
  7. easy to read
  8. many pages
  9. /games/chess.html
  10. font-size
  11. <h6>
  12. 20
  13. :
  14. False
  15. script.js
  16. Hot
  17. strong
  18. red
  19. <p>
  20. center
  21. 3
  22. easy to read
  23. the viewport meta tag
  24. log out on shared PCs
  25. shows a pop-up message
  26. True
  27. you type the URL
  28. changes the page live
  29. No
  30. False
  31. element
  32. 50
  33. <b>
  34. justify-content
  35. index.html
  36. False
  37. <span class="red">
  38. True
  39. width
  40. </h2>

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