← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 161 · 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.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="250">
  2. 2.🎨 A CSS file usually ends with which extension? (a) .js (b) .html (c) .png (d) .css
  3. 3.🖌️ What colour is behind the letters?
    h1 {
      font-size: 16px;
      color: red;
      background-color: purple;
      text-align: left;
    }
    (a) purple (b) red (c) yellow
  4. 4.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) art.html (b) href (c) Contact us (d) About us
  5. 5.🧭 Who is helped most by semantic tags? (a) nobody (b) only the printer (c) screen-reader users (d) only the server
  6. 6.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  7. 7.🎯 Which sign starts a class selector? (a) . (b) & (c) @ (d) #
  8. 8.🌈 Which colour is rgb(255, 255, 0)? (a) magenta (b) blue (c) yellow (d) white
  9. 9.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 19; i = i + 2) {
      console.log(i);
    }
  10. 10.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 20; i = i + 3) {
      console.log(i);
    }
  11. 11.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 4 (d) 3
  12. 12.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h3>? (a) <h1> (b) <h5> (c) <h2> (d) <h3>
  13. 13.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <!DOCTYPE html> (d) <html>
  14. 14.🔍 Which line is missing its closing tag?
    line 1: <small>Our school trip</small>
    line 2: <em>Hello, world!</em>
    line 3: <h2>Cricket is fun.
    (a) line 3 (b) line 2 (c) line 1
  15. 15.📝 Which input type takes only numbers? (a) email (b) date (c) checkbox (d) number
  16. 16.🌈 Which colour is #ff00ff? (a) white (b) magenta (c) cyan (d) black
  17. 17.🔗 Which address opens when you click this link?
    <a href="quiz.html">Take the quiz</a>
    (a) games.html (b) about.html (c) quiz.html (d) Take the quiz
  18. 18.🔢 When you open a web page, what comes right after “the browser asks it”? (a) the browser shows it (b) the server sends files (c) you type the URL (d) DNS finds the server
  19. 19.📱 min-width: 800px applies when the screen is ___. (a) 800px or narrower (b) turned off (c) exactly 100px (d) 800px or wider
  20. 20.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>My pets</h2>
    <p>I love mangoes.</p>
    <h2>Good morning!</h2>
  21. 21.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) Play games (b) news.html (c) art.html (d) maths.html
  22. 22.🔢 On a typical page, from top to bottom, which comes FIRST? (a) <main> (b) <header> (c) <footer> (d) <nav>
  23. 23.🧭 Is <main> semantic or not semantic? (a) not semantic (b) semantic
  24. 24.True or false: “tiny grey text” makes the page harder to use. (a) True (b) False
  25. 25.🌈 Which colour is rgb(0, 0, 0)? (a) white (b) red (c) magenta (d) black
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="50">
  27. 27.📝 Which input type picks a day? (a) radio (b) number (c) text (d) date
  28. 28.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
  29. 29.True or false: HTML gives the page structure. (a) False (b) True
  30. 30.🔍 Which line is missing its closing tag?
    line 1: <h2>Fun facts
    line 2: <p>Hello, world!</p>
    line 3: <h1>Rain today</h1>
    (a) line 2 (b) line 1 (c) line 3
  31. 31.⚖️ What colour is the text of this element?
    <h1 class="big" id="hero">Hi</h1>
    CSS:
    .big { color: green; }
    h1 { color: purple; }
    (a) green (b) purple (c) white (d) black
  32. 32.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) Contact us (b) href (c) maths.html (d) Visit the site
  33. 33.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ul>
  34. 34.⚖️ What colour is the text of this element?
    <p class="menu" id="hero">Hi</p>
    CSS:
    p { color: red; }
    p { color: black; }
    (a) purple (b) red (c) blue (d) black
  35. 35.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  36. 36.True or false: a code editor shows line numbers. (a) False (b) True
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) kite.png (b) width (c) Map of India (d) A red kite
  38. 38.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  39. 39.📱 max-width: 600px applies when the screen is ___. (a) 600px or wider (b) 600px or narrower (c) turned off (d) exactly 1000px
  40. 40.Which of these is safe to do online? (a) put secrets in comments (b) share your password (c) download from pop-ups (d) use a strong password

Answer key

  1. 250
  2. .css
  3. purple
  4. About us
  5. screen-reader users
  6. Yes
  7. .
  8. yellow
  9. 18
  10. 18
  11. 6
  12. <h1>
  13. <!DOCTYPE html>
  14. line 3
  15. number
  16. magenta
  17. quiz.html
  18. the server sends files
  19. 800px or wider
  20. 2
  21. maths.html
  22. <header>
  23. semantic
  24. True
  25. black
  26. 50
  27. date
  28. the body
  29. True
  30. line 1
  31. green
  32. Contact us
  33. 4
  34. black
  35. has a closing tag
  36. True
  37. A red kite
  38. <ol>
  39. 600px or narrower
  40. use a strong password

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