← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 906 · 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 cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th></tr>
      <tr><td>Mango</td><td>Jamun</td><td>Litchi</td></tr>
    </table>
  2. 2.🖌️ Which CSS property colours behind the text? (a) text-align (b) background-color (c) color (d) font-weight
  3. 3.🌈 Hex digits go 0 to 9, then A to which letter? (a) Z (b) G (c) J (d) F
  4. 4.🌈 Which colour is rgb(255, 255, 255)? (a) blue (b) magenta (c) white (d) yellow
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) width (b) tiger.jpg (c) A red kite (d) A tiger asleep
  6. 6.True or false: <td> makes a heading cell. (a) True (b) False
  7. 7.🎯 What kind of selector is .big? (a) an id selector (b) a class selector (c) an element selector
  8. 8.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Rain today</p>
    (a) Rain today (b) My best friend (c) Cricket is fun.
  9. 9.🌈 Which colour is #0000ff? (a) blue (b) cyan (c) red (d) bright green
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Rivers flow<br>Roses are red<br>Stars shine</p>
  11. 11.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
  12. 12.True or false: <li> has a closing tag. (a) False (b) True
  13. 13.🔍 Which line is missing its closing tag?
    line 1: <h2>Our school trip</h2>
    line 2: <p>The red kite
    line 3: <h1>My pets</h1>
    (a) line 1 (b) line 2 (c) line 3
  14. 14.Which of these goes in the body? (a) <title> (b) <style> (c) <a> (d) <link rel="stylesheet">
  15. 15.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) src (d) width
  16. 16.🧭 Which semantic tag holds the main content? (a) <article> (b) <header> (c) <footer> (d) <main>
  17. 17.True or false: margin is the line round the box. (a) False (b) True
  18. 18.🎯 Which CSS selector matches this element?
    <h1 class="note" id="main">Hello</h1>
    (a) .note (b) #note (c) .main (d) h2
  19. 19.True or false: <ul><li>Art</li></ul> goes in index.html. (a) True (b) False
  20. 20.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 3; i++) {
      total = total + i;
    }
    console.log(total);
  21. 21.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Rivers flow<br>Kites fly high<br>Roses are red</p>
  22. 22.🔁 Which word runs code only when something is true? (a) for (b) log (c) let (d) if
  23. 23.True or false: body { margin: 0; } goes in script.js. (a) False (b) True
  24. 24.🌈 Which colour of light is strongest in rgb(182, 126, 36)? (a) blue (b) red (c) green
  25. 25.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) Maths fun (b) href (c) https://example.com (d) Visit the site
  26. 26.What is <input type="date"> for? (a) sends the form (b) picks a day (c) is for one line of words (d) lets you pick only one
  27. 27.True or false: <input type="radio"> hides what you type. (a) True (b) False
  28. 28.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <pic> (d) <p>
  29. 29.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      font-weight: bold;
    }
  30. 30.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Our school trip (c) Rain today
  31. 31.What does background-color do? (a) sets the letter colour (b) makes letters bigger (c) picks the font style (d) colours behind the text
  32. 32.Which of these is the content? (a) space outside the border (b) space inside the border (c) the line round the box (d) the text or picture
  33. 33.True or false: .menu is an element selector. (a) False (b) True
  34. 34.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 1 (d) 10
  35. 35.💪 Which justify-content value packs boxes at the end? (a) space-between (b) center (c) flex-start (d) flex-end
  36. 36.🔍 One closing tag is missing. Which one?
    <small>My pets</small>
    <h1>Our school trip</h1>
    <strong>Rain today
    (a) </h1> (b) </small> (c) </strong> (d) </b>
  37. 37.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
  38. 38.📋 What number does the browser show next to “Grapes”?
    <ol start="8">
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
  39. 39.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    (a) Good morning! (b) Cricket is fun. (c) The red kite
  40. 40.📱 The screen is 700px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No

Answer key

  1. 6
  2. background-color
  3. F
  4. white
  5. A tiger asleep
  6. False
  7. a class selector
  8. Cricket is fun.
  9. blue
  10. 4
  11. src
  12. True
  13. line 2
  14. <a>
  15. src
  16. <main>
  17. False
  18. .note
  19. True
  20. 6
  21. 5
  22. if
  23. False
  24. red
  25. Visit the site
  26. picks a day
  27. False
  28. <img>
  29. 1
  30. Our school trip
  31. colours behind the text
  32. the text or picture
  33. False
  34. 1
  35. flex-end
  36. </strong>
  37. opens it in a new tab
  38. 10
  39. The red kite
  40. No

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