← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 372 · 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.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  2. 2.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
  3. 3.🖌️ Which CSS property picks the font style? (a) font-family (b) text-align (c) font-weight (d) color
  4. 4.📦 In the box model, which part is the text or picture? (a) margin (b) border (c) content (d) padding
  5. 5.⚡ What does this code show?
    let name = "Zoya";
    console.log("Hello, " + name + "!");
    (a) Hello, Zoya! (b) Hello, name! (c) Zoya (d) name
  6. 6.🎯 What kind of selector is body? (a) an id selector (b) an element selector (c) a class selector
  7. 7.🧭 Which semantic tag sits at the very top? (a) <footer> (b) <main> (c) <header> (d) <nav>
  8. 8.🔁 How many numbers does this code print?
    for (let i = 0; i < 10; i = i + 2) {
      console.log(i);
    }
  9. 9.🛡️ Online: is it safe to share your password? (a) safe (b) not safe
  10. 10.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) moon.png (b) dog.jpg (c) bus.jpg (d) A happy dog
  11. 11.✍️ In color: blue; which part is the property? (a) ; (b) blue (c) : (d) color
  12. 12.🔗 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
  13. 13.Which of these is safe to do online? (a) type a password on http (b) put secrets in comments (c) share your password (d) log out on shared PCs
  14. 14.🔍 Which is the odd one out? (a) shows a pop-up message (b) changes the page live (c) makes a link (d) checks a quiz answer
  15. 15.💪 Which justify-content value packs boxes at the end? (a) flex-start (b) flex-end (c) center (d) space-between
  16. 16.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 10px;
      }
    }
    (a) No (b) Yes
  17. 17.🧩 Which language makes a link? (a) CSS (b) HTML (c) JavaScript
  18. 18.🌍 Which one scrambles data on its way? (a) HTTPS (b) the server (c) the browser (d) the URL
  19. 19.🖼️ Which attribute of <img> describes the picture? (a) height (b) alt (c) src (d) width
  20. 20.🎯 Which CSS selector matches this element?
    <h2 class="big" id="end">Hello</h2>
    (a) .big (b) .end (c) .red (d) #hero
  21. 21.🌍 Which program shows a web page to us? (a) a music player (b) a calculator (c) a web browser (d) a paint program
  22. 22.📱 min-width: 800px applies when the screen is ___. (a) 800px or narrower (b) 800px or wider (c) exactly 100px (d) turned off
  23. 23.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h5>? (a) <h3> (b) <h5> (c) <h4> (d) <h1>
  24. 24.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
  25. 25.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Football
      <input type="radio" name="sport"> Chess
      <input type="radio" name="sport"> Hockey
      <input type="radio" name="sport"> Cricket
    </form>
  26. 26.True or false: “colour as the only clue” helps everyone use the page. (a) False (b) True
  27. 27.🖌️ Where does the text sit on its line?
    li {
      font-size: 40px;
      color: blue;
      text-align: right;
      background-color: black;
    }
    (a) in the middle (b) on the right (c) on the left
  28. 28.🌗 Is red on green easy or hard to read? (a) easy to read (b) hard to read
  29. 29.🔗 Which address opens when you click this link?
    <a href="art.html">Art corner</a>
    (a) art.html (b) quiz.html (c) news.html (d) Art corner
  30. 30.⚖️ What colour is the text of this element?
    <p class="red" id="logo">Hi</p>
    CSS:
    .red { color: yellow; }
    p { color: blue; }
    (a) blue (b) orange (c) red (d) yellow
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Stars shine</p>
  32. 32.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
  33. 33.🌈 Which colour is #00ff00? (a) blue (b) yellow (c) cyan (d) bright green
  34. 34.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  35. 35.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
  36. 36.True or false: <img> goes in the head. (a) False (b) True
  37. 37.♿ Is this heading order correct (no level skipped)?
    <h1> → <h3> → <h4> → <h5>
    (a) Yes (b) No
  38. 38.📝 What does <br> do? (a) starts a new line (b) makes a list (c) makes text bold (d) adds a picture
  39. 39.🛡️ Online: is it safe to put secrets in comments? (a) not safe (b) safe
  40. 40.🎨 Which attribute adds CSS inside one tag? (a) src (b) href (c) alt (d) style

Answer key

  1. has a closing tag
  2. to leave notes
  3. font-family
  4. content
  5. Hello, Zoya!
  6. an element selector
  7. <header>
  8. 5
  9. not safe
  10. dog.jpg
  11. color
  12. opens it in a new tab
  13. log out on shared PCs
  14. makes a link
  15. flex-end
  16. No
  17. HTML
  18. HTTPS
  19. alt
  20. .big
  21. a web browser
  22. 800px or wider
  23. <h1>
  24. a paragraph
  25. 1
  26. False
  27. on the right
  28. hard to read
  29. art.html
  30. yellow
  31. 3
  32. a line across the page
  33. bright green
  34. Yes
  35. to describe the image
  36. False
  37. No
  38. starts a new line
  39. not safe
  40. style

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