← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 357 · 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.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 7; i++) {
      total = total + 7;
    }
    console.log(total);
  2. 2.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) games.html (b) Play games (c) quiz.html (d) news.html
  3. 3.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) Play games (b) art.html (c) maths.html (d) news.html
  4. 4.True or false: <input type="number"> takes only numbers. (a) True (b) False
  5. 5.📱 The screen is 820px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 28px;
      }
    }
  6. 6.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
  7. 7.True or false: <input type="number"> lets you tick many. (a) True (b) False
  8. 8.🧭 Is <aside> semantic or not semantic? (a) semantic (b) not semantic
  9. 9.⚖️ What colour is the text of this element?
    <h2 class="box" id="top">Hi</h2>
    CSS:
    #top { color: blue; }
    #top { color: orange; }
    (a) black (b) orange (c) blue (d) red
  10. 10.🚀 Which file is best for code that reacts to clicks? (a) index.html (b) script.js (c) notes.txt (d) style.css
  11. 11.Which of these is a strong password? (a) S0lar!Pen#8 (b) 111111 (c) riya2014 (d) 123456
  12. 12.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <p>Good morning!</p>
    (a) Hello, world! (b) The red kite (c) Good morning!
  13. 13.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
  14. 14.True or false: <li> shows bullet points. (a) False (b) True
  15. 15.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
  16. 16.⚖️ What colour is the text of this element?
    <h1 class="big" id="hero">Hi</h1>
    CSS:
    .big { color: orange; }
    h1 { color: green; }
    (a) orange (b) purple (c) black (d) green
  17. 17.📝 Which tag makes a drop-down list? (a) <ul> (b) <select> (c) <ol> (d) <li>
  18. 18.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) width (c) height (d) src
  19. 19.🔗 Which address opens when you click this link?
    <a href="https://example.com">Visit the site</a>
    (a) maths.html (b) art.html (c) Visit the site (d) https://example.com
  20. 20.🔗 Which address opens when you click this link?
    <a href="art.html">Play games</a>
    (a) art.html (b) Play games (c) quiz.html (d) news.html
  21. 21.Which of these is margin? (a) the gap round content (b) space outside the border (c) a solid or dotted edge (d) space inside the border
  22. 22.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <body> (b) <head>
  23. 23.🎯 Which sign starts a class selector? (a) @ (b) # (c) . (d) &
  24. 24.📱 Which tag helps phones show a page at the right size? (a) the hr tag (b) the br tag (c) the viewport meta tag (d) the title tag
  25. 25.🛡️ Is it safe to use the same password on every site? (a) Yes (b) No
  26. 26.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Cricket Club (c) Try this poha. (d) Match report
  27. 27.💪 Which flexbox property lines boxes up across? (a) justify-content (b) gap (c) align-items (d) flex-direction
  28. 28.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  29. 29.Which of these is an opening tag? (a) </b> (b) <h1> (c) </h1> (d) </p>
  30. 30.🔗 Which address opens when you click this link?
    <a href="games.html">About us</a>
    (a) about.html (b) contact.html (c) games.html (d) About us
  31. 31.True or false: <tr> holds the whole table. (a) True (b) False
  32. 32.🔍 Which line is missing its closing tag?
    line 1: <h2>Good morning!
    line 2: <h3>Hello, world!</h3>
    line 3: <b>My pets</b>
    (a) line 3 (b) line 2 (c) line 1
  33. 33.🔍 One closing tag is missing. Which one?
    <h3>I love mangoes.
    <strong>My pets</strong>
    <p>Cricket is fun.</p>
    (a) </strong> (b) </p> (c) </u> (d) </h3>
  34. 34.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Good morning!</p>
    <h2>Cricket is fun.</h2>
  35. 35.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h4>? (a) <h5> (b) <h2> (c) <h4> (d) <h3>
  36. 36.🔁 When does the else part run? (a) when if is true (b) never (c) when if is false (d) always
  37. 37.True or false: HTML reacts to a button click. (a) True (b) False
  38. 38.🧭 Is <main> semantic or not semantic? (a) not semantic (b) semantic
  39. 39.📱 What does a media query check? (a) the time of day (b) the battery level (c) the screen width (d) the page title
  40. 40.🌈 Which colour is #0000ff? (a) blue (b) bright green (c) magenta (d) black

Answer key

  1. 49
  2. news.html
  3. maths.html
  4. True
  5. 28
  6. alt
  7. False
  8. semantic
  9. orange
  10. script.js
  11. S0lar!Pen#8
  12. The red kite
  13. width
  14. False
  15. 2
  16. orange
  17. <select>
  18. alt
  19. https://example.com
  20. art.html
  21. space outside the border
  22. <head>
  23. .
  24. the viewport meta tag
  25. No
  26. Match report
  27. align-items
  28. src
  29. <h1>
  30. games.html
  31. False
  32. line 1
  33. </h3>
  34. 2
  35. <h2>
  36. when if is false
  37. False
  38. semantic
  39. the screen width
  40. blue

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