← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 923 · 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 colour is rgb(255, 0, 255)? (a) white (b) magenta (c) black (d) blue
  2. 2.🎯 Which CSS selector matches this element?
    <h1 class="big" id="hero">Hello</h1>
    (a) #big (b) .big (c) h2 (d) #top
  3. 3.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 170px;
      padding: 10px;
      border: 1px solid black;
      margin: 10px;
    }
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="250">
  5. 5.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a slash / (d) a dot .
  6. 6.True or false: <table> goes in the head. (a) True (b) False
  7. 7.True or false: padding is space inside the border. (a) False (b) True
  8. 8.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Mango</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
  9. 9.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <main> (b) <header> (c) <footer>
  10. 10.🔗 Which address opens when you click this link?
    <a href="about.html">Art corner</a>
    (a) about.html (b) https://example.com (c) Art corner (d) contact.html
  11. 11.📦 In the box model, which part is space inside the border? (a) border (b) padding (c) content (d) margin
  12. 12.💪 Which flexbox property spaces boxes along a row? (a) justify-content (b) gap (c) flex-direction (d) display: flex
  13. 13.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    (a) Hello, world! (b) My pets (c) I love mangoes. (d) Cricket is fun.
  14. 14.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is fast (b) the site is free (c) the site is a game (d) the data is scrambled
  15. 15.True or false: .card is a class selector. (a) True (b) False
  16. 16.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) map.png (b) tiger.jpg (c) A tiger asleep (d) kite.png
  17. 17.🚀 Which program lets you see your web page while you build it? (a) a calculator (b) a music player (c) a photo viewer (d) a web browser
  18. 18.📊 Which tag makes one data cell? (a) <th> (b) <td> (c) <table> (d) <caption>
  19. 19.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table
  20. 20.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  21. 21.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  22. 22.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 180px;
      justify-content: center;
    }
    Inside are 2 boxes, each 80px wide (no margins).
  23. 23.⚡ What number does this code print?
    let score = 7;
    score = score + 8;
    score = score - 15;
    console.log(score);
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>Cricket is fun.</p>
  25. 25.📝 How many <input> tags are in this form?
    <form>
      <input type="number">
      <input type="email">
      <input type="submit" value="Send">
    </form>
  26. 26.🎨 Which tag connects an outside CSS file? (a) <css> (b) <a> (c) <link> (d) <img>
  27. 27.🧭 Is <section> semantic or not semantic? (a) semantic (b) not semantic
  28. 28.Which of these is an empty tag? (a) <title> (b) <p> (c) <h1> (d) <input>
  29. 29.🌍 Which one is the page’s address? (a) the server (b) HTTPS (c) the browser (d) the URL
  30. 30.🌈 In #0000c2 the blue part is the hex number c2. What is it as a normal number?
  31. 31.📦 In the box model, which part is space outside the border? (a) padding (b) border (c) margin (d) content
  32. 32.🌈 Which hex code is bright green? (a) #000000 (b) #00ffff (c) #ffffff (d) #00ff00
  33. 33.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My pets</p>
    <p>My best friend</p>
    <h3>I love mangoes.</h3>
  34. 34.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
  35. 35.Which of these is safe to do online? (a) use a strong password (b) share your password (c) share your OTP (d) download from pop-ups
  36. 36.🔐 Is riya2014 a strong or a weak password? (a) strong (b) weak
  37. 37.🌈 In #000021 the blue part is the hex number 21. What is it as a normal number?
  38. 38.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Litchi</td><td>Jamun</td></tr>
      <tr><td>Orange</td><td>Litchi</td></tr>
      <tr><td>Orange</td><td>Mango</td></tr>
    </table>
  39. 39.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  40. 40.🔢 On a typical page, from top to bottom, what comes right after “<main>”? (a) <nav> (b) <footer> (c) <header>

Answer key

  1. magenta
  2. .big
  3. 192
  4. 250
  5. a slash /
  6. False
  7. True
  8. 3
  9. <main>
  10. about.html
  11. padding
  12. justify-content
  13. My pets
  14. the data is scrambled
  15. True
  16. tiger.jpg
  17. a web browser
  18. <td>
  19. a line across the page
  20. has a closing tag
  21. numbers
  22. 10
  23. 0
  24. 2
  25. 3
  26. <link>
  27. semantic
  28. <input>
  29. the URL
  30. 194
  31. margin
  32. #00ff00
  33. 2
  34. a code editor
  35. use a strong password
  36. weak
  37. 33
  38. 4
  39. href
  40. <footer>

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