← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 412 · 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.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  2. 2.True or false: in <img>, alt is read by screen readers. (a) False (b) True
  3. 3.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h2> → <h2>
    (a) No (b) Yes
  4. 4.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 1000 (c) 99 (d) 100
  5. 5.🌗 Is black on white easy or hard to read? (a) easy to read (b) hard to read
  6. 6.✍️ What value is given to text-align in this rule?
    h2 {
      text-align: center;
      padding: 8px;
    }
    (a) text-align (b) yellow (c) center (d) 10px
  7. 7.True or false: <td> gives the table a title. (a) True (b) False
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) width (b) A tiger asleep (c) An old fort (d) fort.jpg
  9. 9.⚡ What number does this code print?
    let apples = 6;
    apples = apples + 14;
    apples = apples - 18;
    console.log(apples);
  10. 10.True or false: #end is a class selector. (a) False (b) True
  11. 11.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 190px;
      padding: 30px;
      border: 1px solid black;
      margin: 10px;
    }
  12. 12.📱 What does a media query check? (a) the screen width (b) the time of day (c) the page title (d) the battery level
  13. 13.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Thanks for visiting. (c) body (d) All about me
  14. 14.True or false: <input type="email"> hides what you type. (a) False (b) True
  15. 15.🎯 Which element does the selector span style? (a) <span class="box"> (b) <h2 id="main"> (c) <p> (d) <h1 class="box">
  16. 16.⚡ Which JavaScript word repeats code? (a) console.log() (b) let (c) for (d) alert()
  17. 17.🎯 Which CSS selector matches this element?
    <li class="big" id="main">Hello</li>
    (a) div (b) .red (c) #main (d) #logo
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="50">
    (a) map.png (b) width (c) Map of India (d) Birthday cake
  19. 19.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  20. 20.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) test in a browser (b) write the HTML (c) publish it online (d) add CSS styles
  21. 21.📝 Which tag makes a big box for many lines of text? (a) <br> (b) <textarea> (c) <p> (d) <input>
  22. 22.🔁 What does this code print?
    let score = 28;
    if (score > 15) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) You win (b) Play again
  23. 23.🔒 Is the connection to this address scrambled (encrypted)?
    http://www.example.net/news/today.html
    (a) No (b) Yes
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
  25. 25.🔒 Is the connection to this address scrambled (encrypted)?
    http://learn.example.com/games/chess.html
    (a) Yes (b) No
  26. 26.🚀 Which file should this code go in: console.log(5 + 2); (a) style.css (b) script.js (c) index.html
  27. 27.🔍 Which is the odd one out? (a) adds space around boxes (b) lays out the page (c) makes a form box (d) sets colours and fonts
  28. 28.🧩 Which language makes a form box? (a) JavaScript (b) CSS (c) HTML
  29. 29.⚖️ What colour is the text of this element?
    <h1 class="star" id="hero">Hi</h1>
    CSS:
    h1 { color: red; }
    h1 { color: blue; }
    (a) red (b) blue (c) yellow (d) purple
  30. 30.💪 Which flexbox property turns on flexbox? (a) gap (b) display: flex (c) justify-content (d) align-items
  31. 31.⚡ What does this code print? (Look at the quotes!)
    let x = "3";
    let y = 6;
    console.log(x + y);
    (a) 9 (b) Error (c) 36
  32. 32.📊 How many cells does this table have in all?
    <table>
      <tr><td>Papaya</td><td>Orange</td></tr>
      <tr><td>Jamun</td><td>Papaya</td></tr>
      <tr><td>Papaya</td><td>Papaya</td></tr>
    </table>
  33. 33.📊 How many cells does this table have in all?
    <table>
      <tr><td>Orange</td><td>Papaya</td></tr>
      <tr><td>Guava</td><td>Jamun</td></tr>
    </table>
  34. 34.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 32px;
      }
    }
  35. 35.⚡ What does this code print? (Look at the quotes!)
    let x = "2";
    let y = 8;
    console.log(x + y);
    (a) Error (b) 28 (c) 10
  36. 36.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 10px;
      }
    }
  37. 37.🔐 Is 111111 a strong or a weak password? (a) strong (b) weak
  38. 38.✍️ What value is given to color in this rule?
    body {
      padding: 8px;
      color: red;
      font-weight: bold;
    }
    (a) center (b) 20px (c) color (d) red
  39. 39.🌗 Is white on dark blue easy or hard to read? (a) easy to read (b) hard to read
  40. 40.🔁 Which loop repeats code a set number of times? (a) else (b) let (c) for (d) if

Answer key

  1. an opening tag
  2. True
  3. Yes
  4. 255
  5. easy to read
  6. center
  7. False
  8. An old fort
  9. 2
  10. False
  11. 272
  12. the screen width
  13. All about me
  14. False
  15. <span class="box">
  16. for
  17. #main
  18. Map of India
  19. in the head
  20. write the HTML
  21. <textarea>
  22. You win
  23. No
  24. 250
  25. No
  26. script.js
  27. makes a form box
  28. HTML
  29. blue
  30. display: flex
  31. 36
  32. 6
  33. 4
  34. 24
  35. 28
  36. 10
  37. weak
  38. red
  39. easy to read
  40. for

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