← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 392 · 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.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>My pets</p>
    <p>Our school trip</p>
  2. 2.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) script.js (b) index.html (c) style.css
  3. 3.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Papaya</td><td>Banana</td></tr>
    </table>
  4. 4.🎯 Which CSS selector matches this element?
    <li class="big" id="end">Hello</li>
    (a) .end (b) #big (c) #end (d) #hero
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <em>Hello, world!</em>
    line 2: <h2>The red kite</h2>
    line 3: <i>My best friend
    (a) line 3 (b) line 1 (c) line 2
  6. 6.📝 What does <p> make? (a) a picture (b) a table (c) a link (d) a paragraph
  7. 7.🌍 Which one scrambles data on its way? (a) HTTPS (b) the server (c) the URL (d) the browser
  8. 8.🖌️ What colour are the letters?
    h1 {
      background-color: yellow;
      text-align: left;
      font-size: 24px;
      color: white;
    }
    (a) white (b) black (c) yellow
  9. 9.📝 Which tag gives a form box a name you can click? (a) <title> (b) <hr> (c) <h1> (d) <label>
  10. 10.🔗 Which address opens when you click this link?
    <a href="games.html">Take the quiz</a>
    (a) contact.html (b) about.html (c) Take the quiz (d) games.html
  11. 11.✍️ Which sign goes between a property and its value? (a) ; (b) = (c) : (d) -
  12. 12.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) My Hobbies (c) index.html (d) My drawings
  13. 13.📱 What does a media query check? (a) the time of day (b) the battery level (c) the page title (d) the screen width
  14. 14.✍️ How does a CSS comment start? (a) // (b) /* (c) <!-- (d) #
  15. 15.🌍 What is the domain name in this URL?
    http://learn.example.com/maths/tables.html
    (a) http (b) learn.example.com (c) /maths/tables.html (d) www.example.com
  16. 16.What does text-align do? (a) colours behind the text (b) makes the text bold (c) centres a heading (d) makes letters bigger
  17. 17.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
  18. 18.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
  19. 19.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  20. 20.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
  21. 21.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 18px;
      }
    }
    (a) No (b) Yes
  22. 22.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <h1> (d) <meta charset="utf-8">
  23. 23.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  24. 24.⚡ What number does this code print?
    let coins = 19;
    coins = coins + 7;
    coins = coins - 4;
    console.log(coins);
  25. 25.🎯 Which sign starts an id selector? (a) & (b) # (c) . (d) @
  26. 26.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  27. 27.🔗 Which words do you click on?
    <a href="art.html">School news</a>
    (a) href (b) art.html (c) School news (d) Take the quiz
  28. 28.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <pic> (d) <p>
  29. 29.True or false: margin is space inside the border. (a) False (b) True
  30. 30.🔁 How many times does this code print “Hi”?
    for (let i = 0; i <= 5; i++) {
      console.log("Hi");
    }
  31. 31.✍️ How many declarations (property: value pairs) are in this rule?
    #top {
      width: 300px;
      margin: 10px;
      color: red;
    }
  32. 32.💪 Which justify-content value equal gaps, none at ends? (a) flex-start (b) flex-end (c) space-between (d) center
  33. 33.🧭 Is <div> semantic or not semantic? (a) not semantic (b) semantic
  34. 34.🧩 Which language makes headings and lists? (a) CSS (b) HTML (c) JavaScript
  35. 35.🔢 When you open a web page, which comes first: “the browser shows it” or “the server sends files”? (a) the server sends files (b) the browser shows it
  36. 36.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) script.js (b) style.css (c) index.html
  37. 37.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as a dot (c) as 5 spaces (d) as one space
  38. 38.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  39. 39.🧭 How many <main> parts should a page have? (a) one (b) none (c) three (d) ten
  40. 40.True or false: in <img>, width names the picture file. (a) False (b) True

Answer key

  1. 3
  2. style.css
  3. 2
  4. #end
  5. line 3
  6. a paragraph
  7. HTTPS
  8. white
  9. <label>
  10. games.html
  11. :
  12. My Hobbies
  13. the screen width
  14. /*
  15. learn.example.com
  16. centres a heading
  17. <h1>
  18. element
  19. has a closing tag
  20. to leave notes
  21. No
  22. <h1>
  23. an empty tag
  24. 22
  25. #
  26. in the body
  27. School news
  28. <img>
  29. False
  30. 6
  31. 3
  32. space-between
  33. not semantic
  34. HTML
  35. the server sends files
  36. index.html
  37. as one space
  38. has a closing tag
  39. one
  40. False

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