← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 874 · 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.🛡️ Online: is it safe to tell a trusted adult? (a) safe (b) not safe
  2. 2.🌈 Which colour is rgb(0, 255, 0)? (a) blue (b) bright green (c) yellow (d) magenta
  3. 3.🖌️ Which CSS property colours behind the text? (a) font-family (b) text-align (c) background-color (d) color
  4. 4.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
  5. 5.What is <input type="text"> for? (a) lets you pick only one (b) picks a day (c) is for one line of words (d) is for an email address
  6. 6.Which of these does JavaScript do? (a) makes a link (b) changes the text size (c) reacts to a button click (d) makes headings and lists
  7. 7.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.
    <em>The red kite</em>
    <i>Hello, world!</i>
    (a) </h1> (b) </i> (c) </b> (d) </em>
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="400">
    (a) width (b) A red kite (c) Map of India (d) kite.png
  9. 9.📱 The screen is 700px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 20px;
      }
    }
  10. 10.📝 Which input type is for one line of words? (a) radio (b) text (c) submit (d) email
  11. 11.🛡️ Before typing a password on a site, check the address starts with ___. (a) https (b) http (c) ftp (d) www
  12. 12.True or false: CSS reacts to a button click. (a) True (b) False
  13. 13.⚡ What does this code show?
    let name = "Kabir";
    console.log("Welcome, " + name + "!");
    (a) Kabir (b) name (c) Welcome, name! (d) Welcome, Kabir!
  14. 14.True or false: <aside> holds extra side notes. (a) True (b) False
  15. 15.🎯 Which element does the selector .menu style? (a) <div class="big"> (b) <li id="menu"> (c) <li class="note"> (d) <li class="menu">
  16. 16.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>Our school trip</p>
  17. 17.🎨 One CSS file can style how many pages? (a) many pages (b) only one word (c) no pages (d) only one image
  18. 18.✍️ Which sign ends each CSS declaration? (a) , (b) . (c) ; (d) :
  19. 19.🧩 Which language makes a link? (a) JavaScript (b) CSS (c) HTML
  20. 20.⚡ Where does console.log() show its output? (a) on the title bar (b) in the console (c) on the printer (d) in the address bar
  21. 21.Which of these does JavaScript do? (a) sets colours and fonts (b) puts a picture on a page (c) gives the page structure (d) checks a quiz answer
  22. 22.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Banana</td><td>Papaya</td></tr>
      <tr><td>Grapes</td><td>Banana</td></tr>
    </table>
  23. 23.💪 Which flexbox property turns on flexbox? (a) display: flex (b) gap (c) flex-direction (d) justify-content
  24. 24.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 3; i++) {
      total = total + 8;
    }
    console.log(total);
  25. 25.💪 Which justify-content value packs boxes at the start? (a) space-between (b) flex-end (c) flex-start (d) center
  26. 26.📝 Which input type is for an email address? (a) radio (b) text (c) email (d) checkbox
  27. 27.True or false: <title> goes in the body. (a) False (b) True
  28. 28.🚀 Which file should this code go in: <h1>My Site</h1> (a) index.html (b) script.js (c) style.css
  29. 29.🔁 How many numbers does this code print?
    for (let i = 0; i < 14; i = i + 4) {
      console.log(i);
    }
  30. 30.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Jamun</td><td>Mango</td><td>Litchi</td><td>Grapes</td></tr>
    </table>
  31. 31.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  32. 32.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  33. 33.✍️ What value is given to text-align in this rule?
    p {
      font-style: italic;
      font-weight: bold;
      text-align: center;
    }
    (a) yellow (b) 10px (c) center (d) text-align
  34. 34.🔒 Is the connection to this address scrambled (encrypted)?
    https://kids.example.org/index.html
    (a) No (b) Yes
  35. 35.🌍 What is the domain name in this URL?
    https://learn.example.com/art/gallery.html
    (a) /art/gallery.html (b) https (c) learn.example.com (d) www.example.com
  36. 36.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ul>
  37. 37.♿ What does good colour contrast mean? (a) many bright colours (b) no colours at all (c) only red text (d) text stands out clearly
  38. 38.🔍 Which is the odd one out? (a) answers page requests (b) is where we type code (c) shows line numbers (d) colours code to help us
  39. 39.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) height (d) alt
  40. 40.⚡ What does this code show?
    let name = "Aman";
    console.log("Hello, " + name + "!");
    (a) Aman (b) Hello, name! (c) Hello, Aman! (d) name

Answer key

  1. safe
  2. bright green
  3. background-color
  4. <ol>
  5. is for one line of words
  6. reacts to a button click
  7. </h1>
  8. A red kite
  9. 16
  10. text
  11. https
  12. False
  13. Welcome, Kabir!
  14. True
  15. <li class="menu">
  16. 5
  17. many pages
  18. ;
  19. HTML
  20. in the console
  21. checks a quiz answer
  22. 3
  23. display: flex
  24. 24
  25. flex-start
  26. email
  27. False
  28. index.html
  29. 4
  30. 4
  31. No
  32. in the head
  33. center
  34. Yes
  35. learn.example.com
  36. 4
  37. text stands out clearly
  38. answers page requests
  39. height
  40. Hello, Aman!

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