← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 130 · 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 is the odd one out? (a) has an address bar (b) answers page requests (c) stores a website’s files (d) hosts websites online
  2. 2.🔢 To build and share your first web page, which comes first: “plan what to show” or “write the HTML”? (a) plan what to show (b) write the HTML
  3. 3.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
  4. 4.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <js src="script.js"> (c) <script src="script.js"> (d) <link script.js>
  5. 5.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) bright green (c) white (d) magenta
  6. 6.🌗 Is light grey on white easy or hard to read? (a) hard to read (b) easy to read
  7. 7.🔁 What does this code print?
    let age = 2;
    if (age < 19) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) child (b) teen
  8. 8.✍️ How many declarations (property: value pairs) are in this rule?
    #top {
      font-weight: bold;
    }
  9. 9.Which of these is an opening tag? (a) </p> (b) <h1> (c) </title> (d) </li>
  10. 10.🔍 Which is the odd one out? (a) is where we type code (b) colours code to help us (c) stores a website’s files (d) saves our .html files
  11. 11.🧭 Is <footer> semantic or not semantic? (a) not semantic (b) semantic
  12. 12.🎯 How many elements on a page should have the same id? (a) 5 (b) 1 (c) 2 (d) any number
  13. 13.📝 Which tag makes a big box for many lines of text? (a) <input> (b) <textarea> (c) <br> (d) <p>
  14. 14.True or false: #hero is an element selector. (a) False (b) True
  15. 15.🖼️ Which attribute of <img> tells which image to load? (a) height (b) src (c) alt (d) width
  16. 16.✍️ How does a CSS comment start? (a) // (b) /* (c) <!-- (d) #
  17. 17.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Sky is blue</p>
  18. 18.✍️ How many declarations (property: value pairs) are in this rule?
    h1 {
      padding: 8px;
    }
  19. 19.Which colour pair is easy to read? (a) yellow on white (b) pink on red (c) dark grey on white (d) light grey on white
  20. 20.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) kite.png (b) An old fort (c) fort.jpg (d) tiger.jpg
  21. 21.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to colour it (d) to make it bigger
  22. 22.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Jamun</td><td>Banana</td></tr>
    </table>
  23. 23.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 10px;
      }
    }
    (a) No (b) Yes
  24. 24.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Litchi</td><td>Guava</td></tr>
      <tr><td>Grapes</td><td>Orange</td></tr>
      <tr><td>Guava</td><td>Guava</td></tr>
    </table>
  25. 25.Which colour pair is easy to read? (a) blue on purple (b) light grey on white (c) white on black (d) pink on red
  26. 26.🔍 Which is the odd one out? (a) reacts to a button click (b) lays out the page (c) shows a pop-up message (d) checks a quiz answer
  27. 27.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) High Tech (c) Hot Tags (d) Home Text
  28. 28.🚀 Which file is best for code that reacts to clicks? (a) notes.txt (b) script.js (c) index.html (d) style.css
  29. 29.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Link (d) Language
  30. 30.⚡ Which JavaScript word makes a new variable? (a) for (b) alert() (c) let (d) console.log()
  31. 31.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  32. 32.⚡ What does this code show?
    let name = "Aman";
    console.log("Hello, " + name + "!");
    (a) Aman (b) name (c) Hello, name! (d) Hello, Aman!
  33. 33.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h1>? (a) <h1> (b) <h2> (c) <h5> (d) <h3>
  34. 34.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 160px;
      padding: 20px;
      border: 5px solid black;
      margin: 0px;
    }
  35. 35.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Mouse (d) Machine
  36. 36.⚡ What number does this code print?
    let a = 8;
    let b = 8;
    console.log(a + b);
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
  38. 38.Which of these is padding? (a) space outside the border (b) the line round the box (c) the text or picture (d) the gap round content
  39. 39.🎯 Which sign starts an id selector? (a) & (b) # (c) @ (d) .
  40. 40.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body

Answer key

  1. has an address bar
  2. plan what to show
  3. 5
  4. <script src="script.js">
  5. white
  6. hard to read
  7. teen
  8. 1
  9. <h1>
  10. stores a website’s files
  11. semantic
  12. 1
  13. <textarea>
  14. False
  15. src
  16. /*
  17. 3
  18. 1
  19. dark grey on white
  20. fort.jpg
  21. to describe the image
  22. 2
  23. Yes
  24. 4
  25. white on black
  26. lays out the page
  27. HyperText
  28. script.js
  29. Language
  30. let
  31. Yes
  32. Hello, Aman!
  33. <h5>
  34. 210
  35. Markup
  36. 16
  37. 1
  38. the gap round content
  39. #
  40. in the head

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