← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 830 · 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 heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h5>? (a) <h1> (b) <h4> (c) <h2> (d) <h5>
  2. 2.📱 The screen is 320px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 20px;
      }
    }
    (a) No (b) Yes
  3. 3.True or false: <footer> holds copyright notes. (a) True (b) False
  4. 4.🔐 Is Blue@Tiger_74 a strong or a weak password? (a) strong (b) weak
  5. 5.🔗 Which address opens when you click this link?
    <a href="games.html">Play games</a>
    (a) contact.html (b) about.html (c) Play games (d) games.html
  6. 6.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) src (c) alt (d) height
  7. 7.🎨 Which tag holds CSS inside the head? (a) <style> (b) <script> (c) <body> (d) <css>
  8. 8.⚡ Which JavaScript word writes in the console? (a) let (b) for (c) console.log() (d) alert()
  9. 9.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="400">
    (a) A red kite (b) cake.jpg (c) map.png (d) kite.png
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine<br>Roses are red</p>
  11. 11.What is <input type="text"> for? (a) is for one line of words (b) takes only numbers (c) picks a day (d) is for an email address
  12. 12.⚡ What number does this code print?
    let apples = 28;
    apples = apples + 6;
    apples = apples - 15;
    console.log(apples);
  13. 13.🔍 Which is the odd one out? (a) sends pages over the net (b) hosts websites online (c) stores a website’s files (d) has an address bar
  14. 14.📝 How many <input> tags are in this form?
    <form>
      <input type="date">
      <input type="checkbox">
      <input type="number">
      <input type="text">
      <input type="password">
      <input type="submit" value="Send">
    </form>
  15. 15.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h6> (d) <h1>
  16. 16.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="200">
    (a) kite.png (b) cake.jpg (c) map.png (d) A red kite
  17. 17.True or false: <h1>My Site</h1> goes in script.js. (a) False (b) True
  18. 18.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  19. 19.🎨 Which tag connects an outside CSS file? (a) <img> (b) <css> (c) <link> (d) <a>
  20. 20.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 210px;
      padding: 20px;
      border: 2px solid black;
      margin: 15px;
    }
  21. 21.🔁 What does this code print?
    let temp = 12;
    if (temp > 30) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Hot (b) Cool
  22. 22.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  23. 23.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to describe the image (d) to load it faster
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="400">
  25. 25.📱 The screen is 1366px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 16px;
      }
    }
    (a) No (b) Yes
  26. 26.🧩 Which language adds space around boxes? (a) JavaScript (b) CSS (c) HTML
  27. 27.📊 How many cells are in each row?
    <table>
      <tr><td>Jamun</td><td>Orange</td><td>Mango</td><td>Banana</td></tr>
      <tr><td>Banana</td><td>Guava</td><td>Jamun</td><td>Banana</td></tr>
      <tr><td>Banana</td><td>Guava</td><td>Litchi</td><td>Orange</td></tr>
    </table>
  28. 28.🔗 Where does this link open?
    <a href="about.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  29. 29.🔗 Which address opens when you click this link?
    <a href="quiz.html">Take the quiz</a>
    (a) about.html (b) Take the quiz (c) games.html (d) quiz.html
  30. 30.🎨 What does CSS stand for? (a) Colourful Site Styles (b) Creative Sheet System (c) Cascading Style Sheets (d) Computer Style Sheets
  31. 31.🔁 Which word runs code only when something is true? (a) for (b) log (c) if (d) let
  32. 32.⚡ What number does this code print?
    let a = 48;
    let b = 9;
    console.log(a + b);
  33. 33.What does color do? (a) makes the text bold (b) colours behind the text (c) picks the font style (d) sets the letter colour
  34. 34.⚡ What does this code show?
    let name = "Riya";
    alert("Well done, " + name + "!");
    (a) Riya (b) Well done, Riya! (c) Well done, name! (d) name
  35. 35.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to make links (d) to show pictures
  36. 36.🔢 To build and share your first web page, which comes first: “write the HTML” or “add CSS styles”? (a) add CSS styles (b) write the HTML
  37. 37.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <!DOCTYPE html> (c) <html> (d) <body>
  38. 38.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>Rain today</p>
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
  39. 39.🌈 What is the biggest number one colour can have in rgb()? (a) 255 (b) 100 (c) 1000 (d) 99
  40. 40.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 15; i = i + 3) {
      console.log(i);
    }

Answer key

  1. <h5>
  2. No
  3. True
  4. strong
  5. games.html
  6. height
  7. <style>
  8. console.log()
  9. kite.png
  10. 3
  11. is for one line of words
  12. 19
  13. has an address bar
  14. 6
  15. <h6>
  16. kite.png
  17. False
  18. 2
  19. <link>
  20. 284
  21. Cool
  22. an empty tag
  23. to describe the image
  24. 400
  25. Yes
  26. CSS
  27. 4
  28. in the same tab
  29. quiz.html
  30. Cascading Style Sheets
  31. if
  32. 57
  33. sets the letter colour
  34. Well done, Riya!
  35. to leave notes
  36. write the HTML
  37. <!DOCTYPE html>
  38. 3
  39. 255
  40. 12

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