← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 760 · 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.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  2. 2.✍️ Which sign ends each CSS declaration? (a) , (b) ; (c) . (d) :
  3. 3.⚡ What number does this code print?
    let a = 6;
    let b = 2;
    console.log(a * b);
  4. 4.Which colour pair is easy to read? (a) pink on red (b) blue on purple (c) red on green (d) white on dark blue
  5. 5.🎯 Which sign starts a class selector? (a) @ (b) # (c) . (d) &
  6. 6.True or false: <table> makes one table row. (a) False (b) True
  7. 7.True or false: alert("Hi"); goes in style.css. (a) True (b) False
  8. 8.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h2>? (a) <h3> (b) <h2> (c) <h4> (d) <h5>
  9. 9.Which of these is true of a code editor? (a) opens web pages for us (b) answers page requests (c) colours code to help us (d) has an address bar
  10. 10.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) width (b) A happy dog (c) The full moon (d) dog.jpg
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <h1>I love mangoes.</h1>
    line 2: <b>My best friend
    line 3: <strong>Rain today</strong>
    (a) line 1 (b) line 2 (c) line 3
  13. 13.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
    (a) Good morning! (b) The red kite (c) Our school trip (d) My pets
  14. 14.💬 How does an HTML comment end? (a) >> (b) */ (c) --> (d) //
  15. 15.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      border: 2px solid;
      font-weight: bold;
      font-style: italic;
      text-align: center;
    }
  16. 16.True or false: in <img>, height shows if the image fails. (a) True (b) False
  17. 17.True or false: <img> has a closing tag. (a) False (b) True
  18. 18.⚡ What does this code show?
    let name = "Aman";
    alert("Welcome, " + name + "!");
    (a) Welcome, Aman! (b) Welcome, name! (c) name (d) Aman
  19. 19.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 160px;
      padding: 10px;
      border: 1px solid black;
      margin: 20px;
    }
  20. 20.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      font-weight: bold;
      font-style: italic;
    }
  21. 21.🧩 Which language changes the page live? (a) CSS (b) JavaScript (c) HTML
  22. 22.True or false: #main is an id selector. (a) True (b) False
  23. 23.🔍 One closing tag is missing. Which one?
    <b>Our school trip
    <strong>Fun facts</strong>
    <u>Good morning!</u>
    (a) </em> (b) </b> (c) </u> (d) </strong>
  24. 24.✍️ What is the selector in this CSS rule?
    .note {
      background-color: yellow;
      font-size: 20px;
      text-align: center;
    }
    (a) #top (b) 20px (c) .note (d) background-color
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Stars shine<br>Sky is blue</p>
  26. 26.🔍 Which is the odd one out? (a) reacts to a button click (b) changes the page live (c) counts down a timer (d) changes the text size
  27. 27.🌈 In #dd0000 the red part is the hex number dd. What is it as a normal number?
  28. 28.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h4> → <h4>
    (a) Yes (b) No
  29. 29.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Rain today</p> -->
    <p>The red kite</p>
  30. 30.🧭 Which semantic tag helps you move around? (a) <article> (b) <main> (c) <header> (d) <nav>
  31. 31.💪 Which flexbox property turns on flexbox? (a) flex-direction (b) display: flex (c) align-items (d) justify-content
  32. 32.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  33. 33.🔍 One closing tag is missing. Which one?
    <u>Hello, world!</u>
    <h1>Good morning!
    <em>My pets</em>
    (a) </u> (b) </b> (c) </h1> (d) </em>
  34. 34.🔍 One closing tag is missing. Which one?
    <h3>Our school trip</h3>
    <h2>Hello, world!
    <h1>Cricket is fun.</h1>
    (a) </em> (b) </h2> (c) </h1> (d) </h3>
  35. 35.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
  36. 36.Which of these is not safe to do online? (a) keep passwords secret (b) download from pop-ups (c) ask before downloading (d) use a nickname in games
  37. 37.⚡ A JavaScript file usually ends with which extension? (a) .js (b) .css (c) .jpg (d) .html
  38. 38.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 190px;
      justify-content: flex-end;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  39. 39.🔁 What does this code print?
    let age = 14;
    if (age >= 12) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) child (b) teen
  40. 40.🌍 What is the domain name in this URL?
    https://kids.example.org/maths/tables.html
    (a) kids.example.org (b) https (c) school.example.in (d) /maths/tables.html

Answer key

  1. No
  2. ;
  3. 12
  4. white on dark blue
  5. .
  6. False
  7. False
  8. <h2>
  9. colours code to help us
  10. in the head
  11. A happy dog
  12. line 2
  13. Good morning!
  14. -->
  15. 4
  16. False
  17. False
  18. Welcome, Aman!
  19. 222
  20. 2
  21. JavaScript
  22. True
  23. </b>
  24. .note
  25. 4
  26. changes the text size
  27. 221
  28. No
  29. 3
  30. <nav>
  31. display: flex
  32. <a>
  33. </h1>
  34. </h2>
  35. <!--
  36. download from pop-ups
  37. .js
  38. 70
  39. teen
  40. kids.example.org

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