← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 487 · 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 is the selector in this CSS rule?
    #top {
      color: red;
      width: 300px;
      text-align: center;
      background-color: yellow;
    }
    (a) li (b) #top (c) 300px (d) color
  2. 2.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  3. 3.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as one space (d) as a dot
  4. 4.⚡ What does this code show?
    let name = "Kabir";
    console.log("Welcome, " + name + "!");
    (a) name (b) Kabir (c) Welcome, Kabir! (d) Welcome, name!
  5. 5.True or false: <meta> has a closing tag. (a) True (b) False
  6. 6.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Home Text (c) Hot Tags (d) HyperText
  7. 7.⚖️ What colour is the text of this element?
    <h1 class="box" id="hero">Hi</h1>
    CSS:
    .box { color: orange; }
    .box { color: red; }
    (a) green (b) blue (c) orange (d) red
  8. 8.🛡️ Online: is it safe to check for https first? (a) safe (b) not safe
  9. 9.♿ What does good colour contrast mean? (a) no colours at all (b) only red text (c) text stands out clearly (d) many bright colours
  10. 10.🌈 Which colour of light is strongest in rgb(73, 11, 220)? (a) blue (b) green (c) red
  11. 11.📊 How many cells does this table have in all?
    <table>
      <tr><td>Guava</td><td>Mango</td><td>Banana</td></tr>
      <tr><td>Orange</td><td>Jamun</td><td>Orange</td></tr>
      <tr><td>Mango</td><td>Banana</td><td>Papaya</td></tr>
      <tr><td>Jamun</td><td>Banana</td><td>Mango</td></tr>
    </table>
  12. 12.📊 Where do <td> cells go? (a) inside a <tr> (b) inside a <li> (c) inside the <head> (d) inside a <p>
  13. 13.🎯 Which element does the selector h2 style? (a) <div class="box"> (b) <span id="end"> (c) <h2 class="box"> (d) <li>
  14. 14.⚡ Which JavaScript word writes in the console? (a) let (b) for (c) console.log() (d) if
  15. 15.🚀 Should file names have spaces, like my page.html? (a) No (b) Yes
  16. 16.⚖️ Which selector is the strongest? (a) a class selector (b) an id selector (c) an element selector
  17. 17.Which of these is true of <header>? (a) is the page’s key part (b) holds copyright notes (c) sits at the very top (d) holds extra side notes
  18. 18.True or false: padding is space inside the border. (a) True (b) False
  19. 19.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  20. 20.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>Our school trip</h2>
    <p>Fun facts</p>
  21. 21.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Orange</td><td>Banana</td></tr>
      <tr><td>Grapes</td><td>Mango</td></tr>
    </table>
  22. 22.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h3> or <h5>? (a) <h5> (b) <h2> (c) <h6> (d) <h3>
  23. 23.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) kite.png (b) tiger.jpg (c) fort.jpg (d) An old fort
  24. 24.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
  25. 25.📊 How many cells are in each row?
    <table>
      <tr><td>Papaya</td><td>Grapes</td><td>Orange</td></tr>
      <tr><td>Mango</td><td>Litchi</td><td>Banana</td></tr>
      <tr><td>Grapes</td><td>Papaya</td><td>Guava</td></tr>
    </table>
  26. 26.🧩 Which language reacts to a button click? (a) CSS (b) JavaScript (c) HTML
  27. 27.🔁 How many times does this code print “Hello”?
    for (let i = 0; i <= 6; i++) {
      console.log("Hello");
    }
  28. 28.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <p>My pets</p>
    <p>Good morning!</p>
    (a) Our school trip (b) My pets (c) Good morning! (d) My best friend
  29. 29.⚖️ Which selector is the weakest? (a) a class selector (b) an element selector (c) an id selector
  30. 30.🌈 Which colour is #00ff00? (a) cyan (b) magenta (c) white (d) bright green
  31. 31.🎯 Which element does the selector p style? (a) <h1> (b) <p class="menu"> (c) <h2 class="menu"> (d) <li id="logo">
  32. 32.💪 Which justify-content value equal gaps, none at ends? (a) space-between (b) flex-start (c) center (d) flex-end
  33. 33.📝 Which input type lets you pick only one? (a) number (b) text (c) password (d) radio
  34. 34.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>Cricket is fun.</h2>
    <p>Fun facts</p>
    <h4>Rain today</h4>
  35. 35.⚡ Which JavaScript word shows a pop-up box? (a) for (b) alert() (c) if (d) let
  36. 36.📦 In the box model, which part is the text or picture? (a) margin (b) content (c) border (d) padding
  37. 37.True or false: <caption> makes one table row. (a) False (b) True
  38. 38.📝 Which input type lets you tick many? (a) date (b) checkbox (c) password (d) number
  39. 39.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
  40. 40.💪 Which flexbox property turns on flexbox? (a) flex-direction (b) gap (c) justify-content (d) display: flex

Answer key

  1. #top
  2. has a closing tag
  3. as one space
  4. Welcome, Kabir!
  5. False
  6. HyperText
  7. red
  8. safe
  9. text stands out clearly
  10. blue
  11. 12
  12. inside a <tr>
  13. <h2 class="box">
  14. console.log()
  15. No
  16. an id selector
  17. sits at the very top
  18. True
  19. No
  20. 2
  21. 2
  22. <h2>
  23. fort.jpg
  24. 3
  25. 3
  26. JavaScript
  27. 7
  28. My best friend
  29. an element selector
  30. bright green
  31. <p class="menu">
  32. space-between
  33. radio
  34. 3
  35. alert()
  36. content
  37. False
  38. checkbox
  39. <!DOCTYPE html>
  40. display: flex

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