← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 820 · 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 colour is the text of this element?
    <h1 class="star" id="main">Hi</h1>
    CSS:
    #main { color: black; }
    #main { color: yellow; }
    (a) orange (b) black (c) yellow (d) purple
  2. 2.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Easy snacks (b) Riya’s Recipes (c) Thanks for visiting. (d) index.html
  3. 3.🚀 Which file is best for code that reacts to clicks? (a) style.css (b) script.js (c) notes.txt (d) index.html
  4. 4.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
  5. 5.🎯 Which CSS selector matches this element?
    <span class="note" id="main">Hello</span>
    (a) #logo (b) .note (c) p (d) .main
  6. 6.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it loads faster (c) it makes text red (d) it adds pictures
  7. 7.🌈 Which colour of light is strongest in rgb(81, 46, 217)? (a) red (b) green (c) blue
  8. 8.🌍 Which one scrambles data on its way? (a) the URL (b) HTTPS (c) the browser (d) the server
  9. 9.⚡ What does this code show?
    let name = "Meera";
    console.log("Well done, " + name + "!");
    (a) name (b) Well done, Meera! (c) Meera (d) Well done, name!
  10. 10.📝 Which input type is for one line of words? (a) email (b) text (c) number (d) submit
  11. 11.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 560px;
      justify-content: center;
    }
    Inside are 4 boxes, each 100px wide (no margins).
  12. 12.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
  13. 13.True or false: HTML on its own can make links to pages. (a) True (b) False
  14. 14.🎯 Which sign starts an id selector? (a) & (b) . (c) @ (d) #
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <i>Our school trip
    line 2: <h3>Rain today</h3>
    line 3: <small>The red kite</small>
    (a) line 3 (b) line 1 (c) line 2
  16. 16.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an attribute (d) an element name
  17. 17.⚖️ Which selector is the strongest? (a) a class selector (b) an id selector (c) an element selector
  18. 18.🌗 Is pink on red easy or hard to read? (a) easy to read (b) hard to read
  19. 19.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  20. 20.📊 How many rows does this table have?
    <table>
      <tr><td>Litchi</td><td>Grapes</td></tr>
      <tr><td>Papaya</td><td>Banana</td></tr>
      <tr><td>Litchi</td><td>Jamun</td></tr>
    </table>
  21. 21.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 320px;
      justify-content: flex-end;
    }
    Inside are 4 boxes, each 60px wide (no margins).
  22. 22.📱 What does a media query check? (a) the battery level (b) the page title (c) the screen width (d) the time of day
  23. 23.🔍 Which is the odd one out? (a) puts a picture on a page (b) rounds box corners (c) lays out the page (d) changes the text size
  24. 24.♿ Which link text is clearest? (a) link (b) click here (c) Read the fruit facts (d) here
  25. 25.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  26. 26.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) games.html (b) about.html (c) quiz.html (d) School news
  27. 27.🔢 To build and share your first web page, what comes right after “plan what to show”? (a) write the HTML (b) test in a browser (c) publish it online (d) add CSS styles
  28. 28.⚡ Which JavaScript word runs code when true? (a) let (b) if (c) for (d) console.log()
  29. 29.🎯 Which element does the selector #main style? (a) <div class="main"> (b) <span class="box"> (c) <div id="logo"> (d) <div id="main">
  30. 30.🔁 Which loop repeats code a set number of times? (a) for (b) if (c) let (d) else
  31. 31.📊 Which tag holds the whole table? (a) <table> (b) <caption> (c) <td> (d) <th>
  32. 32.🔍 Which is the odd one out? (a) hosts websites online (b) saves our .html files (c) stores a website’s files (d) sends pages over the net
  33. 33.🔁 How many numbers does this code print?
    for (let i = 0; i < 20; i = i + 3) {
      console.log(i);
    }
  34. 34.🛡️ Online: is it safe to share your OTP? (a) not safe (b) safe
  35. 35.🎯 Which element does the selector .box style? (a) <li id="box"> (b) <li class="box"> (c) <div class="menu"> (d) <li class="star">
  36. 36.📝 Which tag holds a whole form? (a) <table> (b) <input> (c) <form> (d) <ol>
  37. 37.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    (a) Cricket is fun. (b) Fun facts (c) My best friend (d) I love mangoes.
  38. 38.🛡️ A pop-up says you won a prize and asks for your password. What do you do? (a) type the password (b) click it twice (c) close it, tell an adult (d) share it with friends
  39. 39.True or false: <header> holds extra side notes. (a) False (b) True
  40. 40.Which of these is an opening tag? (a) </h1> (b) </li> (c) </b> (d) <title>

Answer key

  1. yellow
  2. Riya’s Recipes
  3. script.js
  4. <h6>
  5. .note
  6. it tells its meaning
  7. blue
  8. HTTPS
  9. Well done, Meera!
  10. text
  11. 80
  12. -->
  13. True
  14. #
  15. line 1
  16. an attribute
  17. an id selector
  18. hard to read
  19. <ol>
  20. 3
  21. 80
  22. the screen width
  23. puts a picture on a page
  24. Read the fruit facts
  25. 2
  26. quiz.html
  27. write the HTML
  28. if
  29. <div id="main">
  30. for
  31. <table>
  32. saves our .html files
  33. 7
  34. not safe
  35. <li class="box">
  36. <form>
  37. I love mangoes.
  38. close it, tell an adult
  39. False
  40. <title>

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