← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 735 · 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 attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
  2. 2.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) width (d) alt
  3. 3.🖌️ How big is the text, in px?
    h1 {
      text-align: center;
      background-color: orange;
      color: yellow;
      font-size: 28px;
    }
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <u>Our school trip</u>
    line 2: <p>Cricket is fun.</p>
    line 3: <h1>The red kite
    (a) line 2 (b) line 3 (c) line 1
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Stars shine<br>Roses are red<br>Kites fly high</p>
  6. 6.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 14px;
      }
    }
  7. 7.Which of these is true of a code editor? (a) answers page requests (b) has an address bar (c) shows line numbers (d) shows pages from the web
  8. 8.🧭 Is <section> semantic or not semantic? (a) not semantic (b) semantic
  9. 9.What does font-weight do? (a) picks the font style (b) colours behind the text (c) makes the text bold (d) centres a heading
  10. 10.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) <body>
  11. 11.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h2>? (a) <h3> (b) <h5> (c) <h1> (d) <h2>
  12. 12.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h1>? (a) <h4> (b) <h1> (c) <h2> (d) <h6>
  13. 13.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
  14. 14.⚡ What number does this code print?
    let a = 17;
    let b = 20;
    console.log(a + b);
  15. 15.💪 Which justify-content value packs boxes at the start? (a) flex-start (b) center (c) flex-end (d) space-between
  16. 16.🖌️ What colour is behind the letters?
    li {
      text-align: left;
      color: orange;
      font-size: 16px;
      background-color: yellow;
    }
    (a) red (b) orange (c) yellow
  17. 17.🌈 In #130000 the red part is the hex number 13. What is it as a normal number?
  18. 18.Which of these goes in the head? (a) <h1> (b) <ul> (c) <p> (d) <meta charset="utf-8">
  19. 19.🎯 What kind of selector is #top? (a) an id selector (b) a class selector (c) an element selector
  20. 20.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>I love mangoes.</h2>
    <h4>Hello, world!</h4>
  21. 21.🛡️ Online: is it safe to download from pop-ups? (a) not safe (b) safe
  22. 22.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 9; i = i + 4) {
      console.log(i);
    }
  23. 23.🔐 Is Blue@Tiger_74 a strong or a weak password? (a) strong (b) weak
  24. 24.🔁 How many times does this code print “Hello”?
    for (let i = 1; i < 4; i++) {
      console.log("Hello");
    }
  25. 25.⚖️ Which selector is the strongest? (a) an id selector (b) a class selector (c) an element selector
  26. 26.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is a game (b) the site is fast (c) the site is free (d) the data is scrambled
  27. 27.True or false: .note is a class selector. (a) False (b) True
  28. 28.⚖️ What colour is the text of this element?
    <h1 class="box" id="main">Hi</h1>
    CSS:
    #main { color: black; }
    #main { color: red; }
    (a) red (b) black (c) orange (d) yellow
  29. 29.🚀 Which file should this code go in: <h1>My Site</h1> (a) script.js (b) index.html (c) style.css
  30. 30.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  31. 31.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
  32. 32.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h6>? (a) <h6> (b) <h2> (c) <h1> (d) <h3>
  33. 33.Which of these is a weak password? (a) Mango#Kite29! (b) Blue@Tiger_74 (c) 111111 (d) S0lar!Pen#8
  34. 34.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) neither (c) the later one (d) the first one
  35. 35.🔐 Is Kite_Fl1es@Dawn a strong or a weak password? (a) weak (b) strong
  36. 36.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
  37. 37.True or false: the content is space inside the border. (a) False (b) True
  38. 38.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h1> (d) <h6>
  39. 39.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  40. 40.🔍 Which is the odd one out? (a) gives the page structure (b) shows a pop-up message (c) makes a link (d) makes headings and lists

Answer key

  1. alt
  2. src
  3. 28
  4. line 3
  5. 5
  6. 14
  7. shows line numbers
  8. semantic
  9. makes the text bold
  10. <!DOCTYPE html>
  11. <h5>
  12. <h6>
  13. <a>
  14. 37
  15. flex-start
  16. yellow
  17. 19
  18. <meta charset="utf-8">
  19. an id selector
  20. 3
  21. not safe
  22. 8
  23. strong
  24. 3
  25. an id selector
  26. the data is scrambled
  27. True
  28. red
  29. index.html
  30. <ul>
  31. a code editor
  32. <h6>
  33. 111111
  34. the later one
  35. strong
  36. href
  37. False
  38. <h1>
  39. <ol>
  40. shows a pop-up message

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