← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 470 · 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.What is <input type="text"> for? (a) hides what you type (b) takes only numbers (c) lets you tick many (d) is for one line of words
  2. 2.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) href (b) Contact us (c) contact.html (d) Visit the site
  3. 3.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
  4. 4.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h4>? (a) <h2> (b) <h5> (c) <h4> (d) <h1>
  5. 5.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) on the browser tab (d) in a big heading
  6. 6.🚀 Which file should this code go in: #top { color: blue; } (a) script.js (b) style.css (c) index.html
  7. 7.🔁 What does i++ do? (a) doubles i (b) prints i (c) takes 1 from i (d) adds 1 to i
  8. 8.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h3>? (a) <h6> (b) <h2> (c) <h1> (d) <h3>
  9. 9.True or false: HTML on its own can count button clicks. (a) False (b) True
  10. 10.✍️ Which property is set to 2px solid in this rule?
    p {
      border: 2px solid;
      margin: 10px;
      font-style: italic;
    }
    (a) 2px solid (b) font-style (c) border (d) width
  11. 11.True or false: in <img>, height sets how tall it is. (a) False (b) True
  12. 12.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>I love mangoes.</p> -->
  13. 13.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
  14. 14.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) shows pages from the web (d) shows line numbers
  15. 15.Which colour pair is easy to read? (a) red on green (b) blue on purple (c) pink on red (d) white on black
  16. 16.📝 Which input type lets you tick many? (a) submit (b) date (c) password (d) checkbox
  17. 17.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
  18. 18.📦 In the box model, which part is the line round the box? (a) margin (b) border (c) content (d) padding
  19. 19.What is <input type="submit"> for? (a) lets you pick only one (b) sends the form (c) hides what you type (d) lets you tick many
  20. 20.📊 Which tag gives the table a title? (a) <caption> (b) <table> (c) <tr> (d) <th>
  21. 21.⚖️ What colour is the text of this element?
    <p class="big" id="end">Hi</p>
    CSS:
    #end { color: black; }
    #end { color: red; }
    (a) orange (b) green (c) black (d) red
  22. 22.🖌️ Where does the text sit on its line?
    p {
      color: red;
      background-color: orange;
      text-align: right;
      font-size: 16px;
    }
    (a) on the left (b) on the right (c) in the middle
  23. 23.True or false: to use a nickname in games is not safe. (a) True (b) False
  24. 24.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 90px;
      padding: 30px;
      border: 3px solid black;
      margin: 0px;
    }
  25. 25.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  26. 26.Which of these is true of <header>? (a) holds the logo and title (b) holds copyright notes (c) holds extra side notes (d) helps you move around
  27. 27.True or false: <tr> makes one data cell. (a) False (b) True
  28. 28.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h4> (d) <h3>
  29. 29.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
  30. 30.⚡ What does this code print? (Look at the quotes!)
    let x = "1";
    let y = 4;
    console.log(x + y);
    (a) Error (b) 5 (c) 14
  31. 31.What does justify-content: space-between do? (a) packs boxes at the end (b) equal gaps, none at ends (c) packs boxes at the start (d) puts boxes in the middle
  32. 32.📱 The screen is 320px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 26px;
      }
    }
    (a) Yes (b) No
  33. 33.🖌️ What colour are the letters?
    p {
      font-size: 20px;
      text-align: left;
      color: white;
      background-color: purple;
    }
    (a) red (b) purple (c) white
  34. 34.♿ A part of the page is under a <h1> heading. Which tag should its sub-heading use? (a) <h2> (b) <h5> (c) <h6> (d) <h3>
  35. 35.📋 What number does the browser show next to “Grapes”?
    <ol start="5">
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
  36. 36.🌍 What is the protocol in this URL?
    https://learn.example.com/art/gallery.html
    (a) /art/gallery.html (b) learn.example.com (c) https (d) http
  37. 37.Which of these goes in the head? (a) <table> (b) <p> (c) <style> (d) <a>
  38. 38.True or false: <li> is an ordered list. (a) True (b) False
  39. 39.🎯 Which CSS selector matches this element?
    <span class="big" id="logo">Hello</span>
    (a) span (b) .red (c) #big (d) p
  40. 40.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>

Answer key

  1. is for one line of words
  2. Contact us
  3. starts a new line
  4. <h1>
  5. on the browser tab
  6. style.css
  7. adds 1 to i
  8. <h1>
  9. False
  10. border
  11. True
  12. 1
  13. the body
  14. shows line numbers
  15. white on black
  16. checkbox
  17. src
  18. border
  19. sends the form
  20. <caption>
  21. red
  22. on the right
  23. False
  24. 156
  25. bullets
  26. holds the logo and title
  27. False
  28. <h1>
  29. <!DOCTYPE html>
  30. 14
  31. equal gaps, none at ends
  32. No
  33. white
  34. <h2>
  35. 6
  36. https
  37. <style>
  38. False
  39. span
  40. <a>

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