← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 55 · 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.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to describe the image (d) to load it faster
  2. 2.🔁 Which loop repeats code a set number of times? (a) let (b) else (c) for (d) if
  3. 3.Which of these does HTML do? (a) counts down a timer (b) rounds box corners (c) adds space around boxes (d) makes a link
  4. 4.📝 Which tag makes a big box for many lines of text? (a) <br> (b) <input> (c) <p> (d) <textarea>
  5. 5.⚡ What does this code show?
    let name = "Arjun";
    console.log("Welcome, " + name + "!");
    (a) Welcome, Arjun! (b) Arjun (c) Welcome, name! (d) name
  6. 6.♿ Who uses a screen reader? (a) only coders (b) only teachers (c) only robots (d) people who are blind
  7. 7.🔍 Which line is missing its closing tag?
    line 1: <u>The red kite
    line 2: <em>Cricket is fun.</em>
    line 3: <h1>Rain today</h1>
    (a) line 2 (b) line 3 (c) line 1
  8. 8.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  9. 9.🧭 Which semantic tag holds copyright notes? (a) <aside> (b) <nav> (c) <footer> (d) <header>
  10. 10.True or false: a web server sends pages over the net. (a) False (b) True
  11. 11.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Good morning!</p> -->
  12. 12.True or false: to use a strong password is safe. (a) True (b) False
  13. 13.🌈 In #00a500 the green part is the hex number a5. What is it as a normal number?
  14. 14.True or false: padding is space outside the border. (a) True (b) False
  15. 15.⚡ What number does this code print?
    let a = 40;
    let b = 11;
    console.log(a - b);
  16. 16.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Jamun</td><td>Litchi</td></tr>
      <tr><td>Papaya</td><td>Grapes</td></tr>
      <tr><td>Litchi</td><td>Mango</td></tr>
    </table>
  17. 17.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h4> or <h3>? (a) <h5> (b) <h2> (c) <h4> (d) <h3>
  18. 18.True or false: the content is the line round the box. (a) True (b) False
  19. 19.True or false: “tiny grey text” helps everyone use the page. (a) True (b) False
  20. 20.🔍 One closing tag is missing. Which one?
    <h1>My best friend</h1>
    <h2>Hello, world!
    <i>Good morning!</i>
    (a) </h1> (b) </u> (c) </i> (d) </h2>
  21. 21.Which colour pair is easy to read? (a) blue on purple (b) light grey on white (c) yellow on black (d) pink on red
  22. 22.📋 What number does the browser show next to “Orange”?
    <ol start="9">
      <li>Mango</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
  23. 23.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
  24. 24.🔁 What does this code print?
    let age = 7;
    if (age < 42) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) child (b) teen
  25. 25.True or false: padding is the text or picture. (a) True (b) False
  26. 26.What is <input type="checkbox"> for? (a) picks a day (b) lets you tick many (c) lets you pick only one (d) is for one line of words
  27. 27.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 100px;
      padding: 20px;
      border: 1px solid black;
      margin: 5px;
    }
  28. 28.🖌️ What colour are the letters?
    h1 {
      font-size: 36px;
      text-align: center;
      color: black;
      background-color: blue;
    }
    (a) red (b) black (c) blue
  29. 29.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 130px;
      justify-content: flex-start;
    }
    Inside are 2 boxes, each 40px wide (no margins).
  30. 30.⚖️ What colour is the text of this element?
    <h2 class="star" id="top">Hi</h2>
    CSS:
    .star { color: white; }
    .star { color: blue; }
    (a) orange (b) white (c) blue (d) green
  31. 31.True or false: <th> holds the whole table. (a) True (b) False
  32. 32.True or false: <input type="date"> picks a day. (a) False (b) True
  33. 33.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
  34. 34.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    <p>Our school trip</p>
    <p>Good morning!</p>
  36. 36.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
  37. 37.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 18px;
      }
    }
    (a) Yes (b) No
  38. 38.⚡ Where does console.log() show its output? (a) in the address bar (b) on the title bar (c) in the console (d) on the printer
  39. 39.🛡️ Online: is it safe to use a strong password? (a) not safe (b) safe
  40. 40.True or false: “colour as the only clue” helps everyone use the page. (a) True (b) False

Answer key

  1. to describe the image
  2. for
  3. makes a link
  4. <textarea>
  5. Welcome, Arjun!
  6. people who are blind
  7. line 1
  8. in a new tab
  9. <footer>
  10. True
  11. 1
  12. True
  13. 165
  14. False
  15. 29
  16. 2
  17. <h5>
  18. False
  19. False
  20. </h2>
  21. yellow on black
  22. 11
  23. a web server
  24. teen
  25. False
  26. lets you tick many
  27. 152
  28. black
  29. 50
  30. blue
  31. False
  32. True
  33. a web browser
  34. an empty tag
  35. 3
  36. red
  37. Yes
  38. in the console
  39. safe
  40. False

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