← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 4 · 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 heading shows the BIGGEST text: <h3>, <h2>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
  2. 2.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <img> (d) <p>
  3. 3.🌗 Is yellow on white easy or hard to read? (a) hard to read (b) easy to read
  4. 4.📦 In the box model, which part is the gap to other boxes? (a) margin (b) border (c) content (d) padding
  5. 5.🌈 Which colour is #0000ff? (a) cyan (b) blue (c) red (d) bright green
  6. 6.🖌️ How big is the text, in px?
    h2 {
      font-size: 12px;
      text-align: left;
      color: orange;
      background-color: white;
    }
  7. 7.🎯 Which CSS selector matches this element?
    <span class="star" id="top">Hello</span>
    (a) .menu (b) .top (c) #top (d) #star
  8. 8.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Cricket is fun.</p> -->
  9. 9.True or false: p is an id selector. (a) True (b) False
  10. 10.💪 Which justify-content value packs boxes at the start? (a) flex-end (b) center (c) flex-start (d) space-between
  11. 11.📊 Where do <td> cells go? (a) inside a <p> (b) inside the <head> (c) inside a <tr> (d) inside a <li>
  12. 12.✍️ Which property is set to 8px in this rule?
    h2 {
      padding: 8px;
      text-align: center;
      background-color: yellow;
    }
    (a) 8px (b) font-weight (c) padding (d) border
  13. 13.🌈 In #0000e0 the blue part is the hex number e0. What is it as a normal number?
  14. 14.🧩 Which language counts down a timer? (a) HTML (b) JavaScript (c) CSS
  15. 15.🌈 Which hex code is yellow? (a) #ffffff (b) #0000ff (c) #ffff00 (d) #000000
  16. 16.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 230px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 50px wide (no margins).
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <p>Cricket is fun.</p>
    line 2: <u>Good morning!
    line 3: <h2>Our school trip</h2>
    (a) line 3 (b) line 2 (c) line 1
  18. 18.🖼️ Which attribute of <img> describes the picture? (a) src (b) width (c) height (d) alt
  19. 19.True or false: <main> holds the main content. (a) False (b) True
  20. 20.🖌️ How big is the text, in px?
    h2 {
      color: black;
      background-color: green;
      text-align: left;
      font-size: 40px;
    }
  21. 21.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  22. 22.⚡ What does this code show?
    let name = "Meera";
    alert("Hello, " + name + "!");
    (a) Hello, name! (b) Hello, Meera! (c) name (d) Meera
  23. 23.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    (a) Good morning! (b) Cricket is fun. (c) Rain today (d) My pets
  24. 24.True or false: <th> makes a heading cell. (a) True (b) False
  25. 25.🌈 In #rrggbb, which colour do the first two digits give? (a) red (b) green (c) black (d) blue
  26. 26.⚖️ What colour is the text of this element?
    <h2 class="red" id="hero">Hi</h2>
    CSS:
    h2 { color: white; }
    .red { color: blue; }
    (a) blue (b) white (c) red (d) green
  27. 27.⚖️ What colour is the text of this element?
    <h2 class="big" id="end">Hi</h2>
    CSS:
    .big { color: red; }
    #end { color: purple; }
    h2 { color: black; }
    (a) black (b) green (c) red (d) purple
  28. 28.⚡ Which JavaScript word writes in the console? (a) let (b) for (c) alert() (d) console.log()
  29. 29.Which of these goes in the head? (a) <ul> (b) <img> (c) <a> (d) <title>
  30. 30.🌗 Is yellow on black easy or hard to read? (a) easy to read (b) hard to read
  31. 31.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h5>? (a) <h1> (b) <h5> (c) <h2> (d) <h4>
  32. 32.True or false: <ol> lists steps in order. (a) False (b) True
  33. 33.⚖️ What colour is the text of this element?
    <h1 class="red" id="main">Hi</h1>
    CSS:
    #main { color: green; }
    #main { color: white; }
    (a) green (b) blue (c) white (d) black
  34. 34.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  35. 35.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
  36. 36.True or false: body is an element selector. (a) True (b) False
  37. 37.🔗 Where does this link open?
    <a href="about.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  38. 38.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <p>Fun facts</p>
    <p>Fun facts</p>
  39. 39.🔗 Where does this link open?
    <a href="about.html" target="_blank">Maths fun</a>
    (a) in a new tab (b) in the same tab
  40. 40.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) <\h3> (c) </h3> (d) <h3/>

Answer key

  1. <h1>
  2. <a>
  3. hard to read
  4. margin
  5. blue
  6. 12
  7. #top
  8. 1
  9. False
  10. flex-start
  11. inside a <tr>
  12. padding
  13. 224
  14. JavaScript
  15. #ffff00
  16. 80
  17. line 2
  18. alt
  19. True
  20. 40
  21. a closing tag
  22. Hello, Meera!
  23. Good morning!
  24. True
  25. red
  26. blue
  27. purple
  28. console.log()
  29. <title>
  30. easy to read
  31. <h1>
  32. True
  33. white
  34. an opening tag
  35. True
  36. True
  37. in the same tab
  38. 1
  39. in a new tab
  40. </h3>

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