← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 175 · 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 of these is true of <footer>? (a) holds one blog post (b) holds a side box of tips (c) sits at the bottom (d) helps you move around
  2. 2.🔁 Which word runs code only when something is true? (a) log (b) let (c) for (d) if
  3. 3.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  4. 4.🔁 How many times does this code print “Well done”?
    for (let i = 3; i <= 8; i++) {
      console.log("Well done");
    }
  5. 5.📊 How many cells does this table have in all?
    <table>
      <tr><td>Banana</td><td>Jamun</td><td>Orange</td></tr>
      <tr><td>Grapes</td><td>Litchi</td><td>Mango</td></tr>
    </table>
  6. 6.True or false: in <img>, width sets how wide it is. (a) True (b) False
  7. 7.💪 Which justify-content value equal gaps, none at ends? (a) center (b) space-between (c) flex-end (d) flex-start
  8. 8.🖌️ Which CSS property colours behind the text? (a) background-color (b) text-align (c) font-family (d) color
  9. 9.📝 Which tag makes a drop-down list? (a) <select> (b) <li> (c) <ol> (d) <ul>
  10. 10.🧩 Which language sets colours and fonts? (a) JavaScript (b) CSS (c) HTML
  11. 11.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <h2>Fun facts</h2>
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
  13. 13.🌍 What finds the server for a domain name like example.com? (a) HTML (b) alt (c) CSS (d) DNS
  14. 14.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3/> (c) <h3> (d) </h3>
  15. 15.⚖️ Which selector is the weakest? (a) a class selector (b) an element selector (c) an id selector
  16. 16.📝 What does <hr> draw? (a) a link (b) a table (c) a picture (d) a line across the page
  17. 17.♿ Is this heading order correct (no level skipped)?
    <h1> → <h1> → <h3> → <h4>
    (a) No (b) Yes
  18. 18.What does background-color do? (a) makes letters bigger (b) picks the font style (c) colours behind the text (d) centres a heading
  19. 19.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>Rain today</p>
    <p>The red kite</p>
  20. 20.🔁 How many times does this code print “Hi”?
    for (let i = 1; i < 5; i++) {
      console.log("Hi");
    }
  21. 21.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  22. 22.True or false: console.log(5 + 2); goes in index.html. (a) True (b) False
  23. 23.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>Fun facts</h2>
    <h2>Good morning!</h2>
  24. 24.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
  25. 25.🚀 Which program lets you see your web page while you build it? (a) a web browser (b) a photo viewer (c) a music player (d) a calculator
  26. 26.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="150">
    (a) bus.jpg (b) moon.png (c) fort.jpg (d) The full moon
  27. 27.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  28. 28.🚀 Which file should this code go in: score = score + 1; (a) index.html (b) script.js (c) style.css
  29. 29.Which of these is true of a web server? (a) shows pages from the web (b) hosts websites online (c) opens web pages for us (d) turns HTML into a page
  30. 30.♿ Does this help everyone, or make the page harder to use: images with no alt? (a) helps everyone (b) makes it harder
  31. 31.🧭 Which semantic tag holds the main content? (a) <main> (b) <article> (c) <nav> (d) <aside>
  32. 32.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  33. 33.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h1> (d) <h6>
  34. 34.✍️ How many declarations (property: value pairs) are in this rule?
    h2 {
      margin: 10px;
    }
  35. 35.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  36. 36.True or false: to put secrets in comments is safe. (a) False (b) True
  37. 37.Which of these is a closing tag? (a) </b> (b) <body> (c) <h1> (d) <b>
  38. 38.Which of these is true of <footer>? (a) holds the menu of links (b) holds one blog post (c) holds copyright notes (d) holds the main content
  39. 39.🖌️ Which CSS property picks the font style? (a) text-align (b) color (c) font-size (d) font-family
  40. 40.📄 Can HTML on its own show paragraphs? (a) No (b) Yes

Answer key

  1. sits at the bottom
  2. if
  3. 3
  4. 6
  5. 6
  6. True
  7. space-between
  8. background-color
  9. <select>
  10. CSS
  11. 3
  12. 1
  13. DNS
  14. </h3>
  15. an element selector
  16. a line across the page
  17. No
  18. colours behind the text
  19. 1
  20. 4
  21. bullets
  22. False
  23. 1
  24. <h4>
  25. a web browser
  26. moon.png
  27. False
  28. script.js
  29. hosts websites online
  30. makes it harder
  31. <main>
  32. an opening tag
  33. <h1>
  34. 1
  35. in the body
  36. False
  37. </b>
  38. holds copyright notes
  39. font-family
  40. Yes

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