← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 41 · 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.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <ul> (d) <br>
  2. 2.True or false: <h1> goes in the head. (a) True (b) False
  3. 3.True or false: in <img>, src sets how tall it is. (a) False (b) True
  4. 4.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <p>My pets</p>
  5. 5.Which of these is margin? (a) the line round the box (b) space outside the border (c) a solid or dotted edge (d) space inside the border
  6. 6.♿ Which link text is clearest? (a) here (b) Read the fruit facts (c) link (d) click here
  7. 7.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  8. 8.🎯 Which element does the selector #intro style? (a) <li class="intro"> (b) <li id="main"> (c) <li id="intro"> (d) <div class="big">
  9. 9.🌈 Which hex code is black? (a) #ffff00 (b) #ff0000 (c) #000000 (d) #00ff00
  10. 10.True or false: <br> has a closing tag. (a) True (b) False
  11. 11.⚖️ Which selector is the weakest? (a) a class selector (b) an element selector (c) an id selector
  12. 12.📊 How many rows does this table have?
    <table>
      <tr><td>Guava</td><td>Litchi</td><td>Guava</td><td>Litchi</td></tr>
      <tr><td>Orange</td><td>Jamun</td><td>Orange</td><td>Banana</td></tr>
      <tr><td>Mango</td><td>Grapes</td><td>Jamun</td><td>Jamun</td></tr>
    </table>
  13. 13.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h2> → <h3>
    (a) Yes (b) No
  14. 14.⚖️ What colour is the text of this element?
    <h2 class="box" id="end">Hi</h2>
    CSS:
    h2 { color: orange; }
    h2 { color: white; }
    (a) purple (b) white (c) green (d) orange
  15. 15.🧭 Is <footer> semantic or not semantic? (a) not semantic (b) semantic
  16. 16.📊 Which tag makes a heading cell? (a) <tr> (b) <th> (c) <td> (d) <caption>
  17. 17.Which of these is an opening tag? (a) <h1> (b) </p> (c) </body> (d) </title>
  18. 18.✍️ CSS declarations go inside which brackets? (a) [ ] (b) { } (c) < > (d) ( )
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) Birthday cake (b) cake.jpg (c) A happy dog (d) width
  20. 20.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  21. 21.📝 Which input type lets you tick many? (a) submit (b) date (c) checkbox (d) password
  22. 22.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) width (d) alt
  23. 23.True or false: <a href="a.html">Go</a> goes in style.css. (a) False (b) True
  24. 24.📊 How many cells are in each row?
    <table>
      <tr><td>Papaya</td><td>Banana</td></tr>
      <tr><td>Litchi</td><td>Guava</td></tr>
      <tr><td>Grapes</td><td>Litchi</td></tr>
      <tr><td>Papaya</td><td>Grapes</td></tr>
    </table>
  25. 25.🔗 Which address opens when you click this link?
    <a href="quiz.html">Take the quiz</a>
    (a) Take the quiz (b) about.html (c) quiz.html (d) games.html
  26. 26.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  27. 27.🚀 Which file should this code go in: alert("Hi"); (a) script.js (b) style.css (c) index.html
  28. 28.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 19; i = i + 3) {
      console.log(i);
    }
  29. 29.🔁 What does this code print?
    let marks = 5;
    if (marks > 39) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  30. 30.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Try this poha. (c) index.html (d) Easy snacks
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
  32. 32.♿ Does this help everyone, or make the page harder to use: tiny grey text? (a) makes it harder (b) helps everyone
  33. 33.⚖️ What colour is the text of this element?
    <h2 class="big" id="logo">Hi</h2>
    CSS:
    #logo { color: blue; }
    .big { color: black; }
    h2 { color: green; }
    (a) blue (b) red (c) black (d) green
  34. 34.🧩 Which language rounds box corners? (a) JavaScript (b) CSS (c) HTML
  35. 35.🔐 Is Rain#Drop_42! a strong or a weak password? (a) strong (b) weak
  36. 36.🌈 Which colour is #0000ff? (a) cyan (b) blue (c) magenta (d) red
  37. 37.True or false: #logo is an id selector. (a) True (b) False
  38. 38.True or false: “use headings in order” helps everyone use the page. (a) False (b) True
  39. 39.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    (a) Hello, world! (b) I love mangoes. (c) Fun facts
  40. 40.True or false: <table> holds the whole table. (a) True (b) False

Answer key

  1. <ol>
  2. False
  3. False
  4. 3
  5. space outside the border
  6. Read the fruit facts
  7. has a closing tag
  8. <li id="intro">
  9. #000000
  10. False
  11. an element selector
  12. 3
  13. Yes
  14. white
  15. semantic
  16. <th>
  17. <h1>
  18. { }
  19. Birthday cake
  20. Yes
  21. checkbox
  22. width
  23. False
  24. 2
  25. quiz.html
  26. No
  27. script.js
  28. 18
  29. Try again
  30. Class 7 Blog
  31. 2
  32. makes it harder
  33. blue
  34. CSS
  35. strong
  36. blue
  37. True
  38. True
  39. Hello, world!
  40. True

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