← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 943 · 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.True or false: HTML gives the page structure. (a) False (b) True
  2. 2.🚀 Which file should this code go in: #top { color: blue; } (a) index.html (b) style.css (c) script.js
  3. 3.🌗 Is white on dark blue easy or hard to read? (a) hard to read (b) easy to read
  4. 4.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
  5. 5.⚖️ What colour is the text of this element?
    <p class="red" id="intro">Hi</p>
    CSS:
    #intro { color: yellow; }
    p { color: white; }
    (a) white (b) purple (c) orange (d) yellow
  6. 6.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <li> (d) <ul>
  7. 7.🔐 Is Chai$Cup_19x a strong or a weak password? (a) strong (b) weak
  8. 8.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
  9. 9.True or false: <footer> holds a news story. (a) True (b) False
  10. 10.🔍 Which is the odd one out? (a) shows pages from the web (b) turns HTML into a page (c) has an address bar (d) colours code to help us
  11. 11.🌈 Which colour is #00ff00? (a) red (b) bright green (c) cyan (d) white
  12. 12.📊 How many cells are in each row?
    <table>
      <tr><td>Orange</td><td>Orange</td><td>Jamun</td></tr>
      <tr><td>Orange</td><td>Grapes</td><td>Banana</td></tr>
      <tr><td>Guava</td><td>Jamun</td><td>Jamun</td></tr>
      <tr><td>Orange</td><td>Papaya</td><td>Orange</td></tr>
    </table>
  13. 13.🧭 How many <main> parts should a page have? (a) one (b) ten (c) none (d) three
  14. 14.🌈 Which colour of light is strongest in rgb(34, 87, 238)? (a) red (b) green (c) blue
  15. 15.🔁 Which loop repeats code a set number of times? (a) if (b) let (c) for (d) else
  16. 16.True or false: <td> makes a heading cell. (a) False (b) True
  17. 17.Which of these is not safe to do online? (a) tell a trusted adult (b) use a strong password (c) meet an online stranger (d) keep passwords secret
  18. 18.Which of these is a weak password? (a) Blue@Tiger_74 (b) Rain#Drop_42! (c) S0lar!Pen#8 (d) 111111
  19. 19.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 22px;
      }
    }
    (a) No (b) Yes
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
  21. 21.🔗 Where does this link open?
    <a href="art.html">Play games</a>
    (a) in a new tab (b) in the same tab
  22. 22.🎨 Which tag connects an outside CSS file? (a) <css> (b) <a> (c) <link> (d) <img>
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
  24. 24.🧩 Which language changes the text size? (a) HTML (b) CSS (c) JavaScript
  25. 25.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="100">
    (a) fort.jpg (b) A tiger asleep (c) An old fort (d) width
  26. 26.True or false: <th> makes one data cell. (a) False (b) True
  27. 27.🚀 Which program lets you see your web page while you build it? (a) a music player (b) a web browser (c) a photo viewer (d) a calculator
  28. 28.What does justify-content: flex-start do? (a) packs boxes at the start (b) puts boxes in the middle (c) packs boxes at the end (d) equal gaps, none at ends
  29. 29.True or false: in <img>, width sets how wide it is. (a) False (b) True
  30. 30.🎨 A CSS file usually ends with which extension? (a) .html (b) .js (c) .css (d) .png
  31. 31.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  32. 32.✍️ What is the selector in this CSS rule?
    h2 {
      font-style: italic;
      width: 300px;
      text-align: center;
      font-size: 20px;
    }
    (a) h1 (b) font-style (c) 300px (d) h2
  33. 33.⚡ Which JavaScript word repeats code? (a) console.log() (b) for (c) let (d) alert()
  34. 34.⚡ What number does this code print?
    let a = 51;
    let b = 23;
    console.log(a + b);
  35. 35.🎯 Which element does the selector #intro style? (a) <li id="main"> (b) <li class="intro"> (c) <div class="box"> (d) <li id="intro">
  36. 36.🖌️ Which CSS property makes the text bold? (a) color (b) font-size (c) font-weight (d) font-family
  37. 37.🎯 What kind of selector is li? (a) a class selector (b) an element selector (c) an id selector
  38. 38.True or false: in <img>, src names the picture file. (a) True (b) False
  39. 39.🚀 Should file names have spaces, like my page.html? (a) Yes (b) No
  40. 40.⚖️ What colour is the text of this element?
    <h1 class="menu" id="top">Hi</h1>
    CSS:
    h1 { color: blue; }
    .menu { color: red; }
    #top { color: purple; }
    (a) blue (b) red (c) black (d) purple

Answer key

  1. True
  2. style.css
  3. easy to read
  4. False
  5. yellow
  6. <li>
  7. strong
  8. href
  9. False
  10. colours code to help us
  11. bright green
  12. 3
  13. one
  14. blue
  15. for
  16. False
  17. meet an online stranger
  18. 111111
  19. Yes
  20. 3
  21. in the same tab
  22. <link>
  23. 1
  24. CSS
  25. An old fort
  26. False
  27. a web browser
  28. packs boxes at the start
  29. True
  30. .css
  31. Yes
  32. h2
  33. for
  34. 74
  35. <li id="intro">
  36. font-weight
  37. an element selector
  38. True
  39. No
  40. purple

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