← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 745 · 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 line is missing its closing tag?
    line 1: <p>Cricket is fun.</p>
    line 2: <h2>Good morning!
    line 3: <h3>Our school trip</h3>
    (a) line 1 (b) line 3 (c) line 2
  2. 2.💪 Which justify-content value puts boxes in the middle? (a) flex-end (b) space-between (c) center (d) flex-start
  3. 3.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    (a) Hello, world! (b) Fun facts (c) Our school trip (d) My best friend
  4. 4.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>Hello, world!</h4>
    <p>My pets</p>
    <h2>The red kite</h2>
    <p>Hello, world!</p>
  5. 5.📝 What do we need to write HTML? (a) a printer (b) a paintbrush (c) a microphone (d) a plain text editor
  6. 6.🎨 A CSS file usually ends with which extension? (a) .png (b) .js (c) .css (d) .html
  7. 7.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 8px;
      }
    }
  8. 8.📱 Which tag helps phones show a page at the right size? (a) the viewport meta tag (b) the title tag (c) the br tag (d) the hr tag
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue</p>
  10. 10.✍️ How many declarations (property: value pairs) are in this rule?
    body {
      font-weight: bold;
      padding: 8px;
      font-style: italic;
    }
  11. 11.🔁 When does the else part run? (a) always (b) never (c) when if is true (d) when if is false
  12. 12.🌍 What do we call the computer that stores a website? (a) a server (b) a keyboard (c) a mouse (d) a printer
  13. 13.True or false: the browser asks for a web page. (a) True (b) False
  14. 14.True or false: console.log(5 + 2); goes in script.js. (a) True (b) False
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) An old fort (b) A tiger asleep (c) fort.jpg (d) width
  16. 16.What does text-align do? (a) makes the text bold (b) picks the font style (c) colours behind the text (d) centres a heading
  17. 17.✍️ What value is given to width in this rule?
    .box {
      font-weight: bold;
      width: 300px;
      font-size: 20px;
    }
    (a) 300px (b) width (c) italic (d) red
  18. 18.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 90px;
      padding: 30px;
      border: 1px solid black;
      margin: 0px;
    }
  19. 19.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>I love mangoes.</p> -->
  20. 20.🔤 In “HTML”, what does the L stand for? (a) Line (b) Language (c) Laptop (d) Link
  21. 21.True or false: a web browser hosts websites online. (a) True (b) False
  22. 22.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) starts a new line (d) makes a list
  23. 23.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.💪 Which flexbox property picks row or column? (a) justify-content (b) display: flex (c) align-items (d) flex-direction
  25. 25.🌍 What is the path in this URL?
    https://www.example.net/art/gallery.html
    (a) https (b) /news/today.html (c) /art/gallery.html (d) www.example.net
  26. 26.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
  27. 27.🔗 Where does this link open?
    <a href="games.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  28. 28.✍️ What value is given to margin in this rule?
    p {
      margin: 10px;
      color: red;
      width: 300px;
    }
    (a) margin (b) bold (c) 8px (d) 10px
  29. 29.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) https://example.com (b) href (c) Visit the site (d) Contact us
  30. 30.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
  31. 31.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 24px;
      }
    }
  32. 32.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
  33. 33.📱 The screen is 1100px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (min-width: 480px) {
      p {
        font-size: 14px;
      }
    }
  34. 34.Which of these goes in the body? (a) <title> (b) <ul> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
  35. 35.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Good morning!</h2>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
  36. 36.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <p>Good morning!</p>
    (a) Good morning! (b) My best friend (c) My pets
  37. 37.🖌️ Where does the text sit on its line?
    p {
      font-size: 32px;
      background-color: blue;
      color: red;
      text-align: left;
    }
    (a) on the left (b) on the right (c) in the middle
  38. 38.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 300px;
      justify-content: flex-end;
    }
    Inside are 4 boxes, each 60px wide (no margins).
  39. 39.💪 Which justify-content value packs boxes at the end? (a) center (b) space-between (c) flex-start (d) flex-end
  40. 40.🌗 Is yellow on white easy or hard to read? (a) easy to read (b) hard to read

Answer key

  1. line 2
  2. center
  3. Our school trip
  4. 3
  5. a plain text editor
  6. .css
  7. 8
  8. the viewport meta tag
  9. 2
  10. 3
  11. when if is false
  12. a server
  13. True
  14. True
  15. An old fort
  16. centres a heading
  17. 300px
  18. 152
  19. 1
  20. Language
  21. False
  22. starts a new line
  23. an opening tag
  24. flex-direction
  25. /art/gallery.html
  26. <li>
  27. in a new tab
  28. 10px
  29. Contact us
  30. <a>
  31. 20
  32. 6
  33. 14
  34. <ul>
  35. 5
  36. My best friend
  37. on the left
  38. 60
  39. flex-end
  40. hard to read

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