← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 748 · 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.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h4> → <h5>
    (a) No (b) Yes
  2. 2.Which of these is padding? (a) space inside the border (b) the gap to other boxes (c) the text or picture (d) a solid or dotted edge
  3. 3.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    (a) Rain today (b) Hello, world! (c) Cricket is fun.
  4. 4.True or false: in <img>, width names the picture file. (a) False (b) True
  5. 5.✍️ How many declarations (property: value pairs) are in this rule?
    .note {
      font-style: italic;
    }
  6. 6.True or false: “colour as the only clue” helps everyone use the page. (a) False (b) True
  7. 7.True or false: .box { padding: 8px; } goes in index.html. (a) False (b) True
  8. 8.What does font-size do? (a) centres a heading (b) sets the letter colour (c) makes the text bold (d) makes letters bigger
  9. 9.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Hello, world!</p>
    <h2>Our school trip</h2>
    <p>Rain today</p>
  10. 10.⚡ Which JavaScript word shows a pop-up box? (a) console.log() (b) alert() (c) let (d) for
  11. 11.⚡ What number does this code print?
    let a = 19;
    let b = 29;
    console.log(a + b);
  12. 12.⚡ What number does this code print?
    let marks = 9;
    marks = marks + 15;
    marks = marks - 21;
    console.log(marks);
  13. 13.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) makes it harder (b) helps everyone
  14. 14.🧭 Is <div> semantic or not semantic? (a) not semantic (b) semantic
  15. 15.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h5>? (a) <h6> (b) <h1> (c) <h5> (d) <h2>
  16. 16.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h3> or <h1>? (a) <h5> (b) <h6> (c) <h1> (d) <h3>
  17. 17.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
  18. 18.True or false: <p> goes in the head. (a) True (b) False
  19. 19.⚖️ What colour is the text of this element?
    <p class="note" id="hero">Hi</p>
    CSS:
    p { color: purple; }
    .note { color: red; }
    (a) yellow (b) red (c) purple (d) black
  20. 20.True or false: .star is an id selector. (a) True (b) False
  21. 21.⚖️ Which selector is the strongest? (a) an id selector (b) an element selector (c) a class selector
  22. 22.⚡ What number does this code print?
    let marks = 15;
    marks = marks + 2;
    marks = marks - 12;
    console.log(marks);
  23. 23.🔍 One closing tag is missing. Which one?
    <i>Hello, world!
    <strong>Rain today</strong>
    <small>The red kite</small>
    (a) </h3> (b) </strong> (c) </i> (d) </small>
  24. 24.⚡ What number does this code print?
    let books = 11;
    books = books + 5;
    books = books - 2;
    console.log(books);
  25. 25.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Mango</td><td>Jamun</td><td>Orange</td><td>Grapes</td></tr>
      <tr><td>Litchi</td><td>Banana</td><td>Mango</td><td>Grapes</td></tr>
      <tr><td>Litchi</td><td>Litchi</td><td>Grapes</td><td>Papaya</td></tr>
    </table>
  26. 26.What does text-align do? (a) centres a heading (b) makes letters bigger (c) sets the letter colour (d) picks the font style
  27. 27.🌍 Which program shows a web page to us? (a) a web browser (b) a music player (c) a paint program (d) a calculator
  28. 28.🌈 Which colour of light is strongest in rgb(67, 90, 218)? (a) green (b) red (c) blue
  29. 29.🔗 Where does this link open?
    <a href="art.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  30. 30.🔁 How many times does this code print “Hello”?
    for (let i = 0; i < 2; i++) {
      console.log("Hello");
    }
  31. 31.🛡️ Online: is it safe to log out on shared PCs? (a) safe (b) not safe
  32. 32.🔁 How many times does this code print “Hi”?
    for (let i = 2; i < 8; i++) {
      console.log("Hi");
    }
  33. 33.🌈 Which hex code is blue? (a) #00ffff (b) #000000 (c) #ff00ff (d) #0000ff
  34. 34.True or false: <li> has a closing tag. (a) True (b) False
  35. 35.Which of these is an empty tag? (a) <h1> (b) <title> (c) <input> (d) <ul>
  36. 36.🚀 Which file is best for code that reacts to clicks? (a) notes.txt (b) index.html (c) style.css (d) script.js
  37. 37.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  38. 38.🔍 Which is the odd one out? (a) puts a picture on a page (b) counts down a timer (c) reacts to a button click (d) checks a quiz answer
  39. 39.🏷️ Which is the closing tag for <strong>? (a) </strong> (b) <strong> (c) <\strong> (d) <strong/>
  40. 40.📊 Which tag makes one data cell? (a) <th> (b) <table> (c) <td> (d) <tr>

Answer key

  1. No
  2. space inside the border
  3. Rain today
  4. False
  5. 1
  6. False
  7. False
  8. makes letters bigger
  9. 2
  10. alert()
  11. 48
  12. 3
  13. makes it harder
  14. not semantic
  15. <h1>
  16. <h6>
  17. -->
  18. False
  19. red
  20. False
  21. an id selector
  22. 5
  23. </i>
  24. 14
  25. 4
  26. centres a heading
  27. a web browser
  28. blue
  29. in a new tab
  30. 2
  31. safe
  32. 6
  33. #0000ff
  34. True
  35. <input>
  36. script.js
  37. Yes
  38. puts a picture on a page
  39. </strong>
  40. <td>

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