← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 484 · 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> names the picture file? (a) height (b) width (c) alt (d) src
  2. 2.🌍 What is the protocol in this URL?
    http://school.example.in/art/gallery.html
    (a) /art/gallery.html (b) school.example.in (c) https (d) http
  3. 3.⚖️ Which selector is the weakest? (a) a class selector (b) an id selector (c) an element selector
  4. 4.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) My Hobbies (b) Thanks for visiting. (c) body (d) Planets
  5. 5.🖌️ What colour are the letters?
    p {
      color: yellow;
      font-size: 20px;
      background-color: white;
      text-align: left;
    }
    (a) yellow (b) white (c) black
  6. 6.📝 Which tag holds a whole form? (a) <table> (b) <form> (c) <ol> (d) <input>
  7. 7.Which of these is a weak password? (a) Blue@Tiger_74 (b) qwerty (c) Rain#Drop_42! (d) Mango#Kite29!
  8. 8.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <h2>Fun facts</h2>
    <h2>I love mangoes.</h2>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
  9. 9.🌈 In #00e200 the green part is the hex number e2. What is it as a normal number?
  10. 10.True or false: <p> has a closing tag. (a) False (b) True
  11. 11.Which of these goes in the head? (a) <a> (b) <p> (c) <table> (d) <title>
  12. 12.♿ What does good colour contrast mean? (a) only red text (b) no colours at all (c) text stands out clearly (d) many bright colours
  13. 13.🌍 What is the protocol in this URL?
    https://school.example.in/news/today.html
    (a) http (b) https (c) /news/today.html (d) school.example.in
  14. 14.🔢 To build and share your first web page, which comes FIRST? (a) test in a browser (b) publish it online (c) plan what to show (d) add CSS styles
  15. 15.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 14px;
      }
    }
    (a) No (b) Yes
  16. 16.⚖️ What colour is the text of this element?
    <p class="star" id="intro">Hi</p>
    CSS:
    #intro { color: black; }
    #intro { color: blue; }
    (a) blue (b) black (c) purple (d) green
  17. 17.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 14px;
      }
    }
  18. 18.True or false: <article> holds one blog post. (a) False (b) True
  19. 19.🧩 Which language adds space around boxes? (a) HTML (b) CSS (c) JavaScript
  20. 20.⚖️ Which selector is the strongest? (a) an element selector (b) an id selector (c) a class selector
  21. 21.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
  22. 22.True or false: a web browser opens web pages for us. (a) False (b) True
  23. 23.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small/> (c) <small> (d) </small>
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="50">
  25. 25.⚡ Which JavaScript word writes in the console? (a) alert() (b) console.log() (c) let (d) for
  26. 26.🎯 What kind of selector is .card? (a) an id selector (b) a class selector (c) an element selector
  27. 27.⚖️ What colour is the text of this element?
    <p class="big" id="intro">Hi</p>
    CSS:
    p { color: orange; }
    #intro { color: blue; }
    (a) purple (b) yellow (c) blue (d) orange
  28. 28.What does color do? (a) makes the text bold (b) centres a heading (c) sets the letter colour (d) picks the font style
  29. 29.True or false: HTML adds space around boxes. (a) False (b) True
  30. 30.📱 Responsive design means a page ___. (a) fits every screen (b) never changes (c) is only for laptops (d) has no pictures
  31. 31.✍️ What is the selector in this CSS rule?
    h1 {
      font-weight: bold;
      width: 300px;
    }
    (a) font-weight (b) 300px (c) h1 (d) p
  32. 32.🔢 On a typical page, from top to bottom, which comes first: “<nav>” or “<main>”? (a) <main> (b) <nav>
  33. 33.True or false: a web browser shows line numbers. (a) True (b) False
  34. 34.📝 How many <input> tags are in this form?
    <form>
      <input type="number">
      <input type="email">
      <input type="date">
      <input type="submit" value="Send">
    </form>
  35. 35.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="300">
    (a) Our school bus (b) width (c) moon.png (d) The full moon
  36. 36.🖌️ How big is the text, in px?
    li {
      background-color: white;
      color: yellow;
      text-align: left;
      font-size: 36px;
    }
  37. 37.🔍 One closing tag is missing. Which one?
    <small>My best friend
    <h2>I love mangoes.</h2>
    <b>Cricket is fun.</b>
    (a) </h2> (b) </small> (c) </b> (d) </u>
  38. 38.🔁 What does this code print?
    let temp = 9;
    if (temp > 12) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Hot (b) Cool
  39. 39.🖌️ Which CSS property sets the letter colour? (a) font-size (b) font-family (c) background-color (d) color
  40. 40.📱 What does a media query check? (a) the time of day (b) the battery level (c) the page title (d) the screen width

Answer key

  1. src
  2. http
  3. an element selector
  4. Planets
  5. yellow
  6. <form>
  7. qwerty
  8. 4
  9. 226
  10. True
  11. <title>
  12. text stands out clearly
  13. https
  14. plan what to show
  15. No
  16. blue
  17. 14
  18. True
  19. CSS
  20. an id selector
  21. <a>
  22. True
  23. </small>
  24. 50
  25. console.log()
  26. a class selector
  27. blue
  28. sets the letter colour
  29. False
  30. fits every screen
  31. h1
  32. <nav>
  33. False
  34. 4
  35. The full moon
  36. 36
  37. </small>
  38. Cool
  39. color
  40. the screen width

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