← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 767 · 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 element does the selector .big style? (a) <h1 class="red"> (b) <h2 class="box"> (c) <h1 class="big"> (d) <h1 id="big">
  2. 2.🛡️ Online: is it safe to meet an online stranger? (a) not safe (b) safe
  3. 3.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 1024px) {
      p {
        font-size: 14px;
      }
    }
    (a) Yes (b) No
  4. 4.💬 Does the browser show comments on the page? (a) No (b) Yes
  5. 5.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <i>Our school trip</i>
    line 2: <h3>I love mangoes.</h3>
    line 3: <small>Hello, world!
    (a) line 1 (b) line 3 (c) line 2
  7. 7.Which of these is true of a web server? (a) is where we type code (b) answers page requests (c) saves our .html files (d) shows line numbers
  8. 8.💪 Which justify-content value equal gaps, none at ends? (a) space-between (b) flex-end (c) center (d) flex-start
  9. 9.♿ Who uses a screen reader? (a) only teachers (b) only robots (c) only coders (d) people who are blind
  10. 10.⚡ What does this code print? (Look at the quotes!)
    let x = "3";
    let y = 8;
    console.log(x + y);
    (a) 11 (b) Error (c) 38
  11. 11.🌐 Which one stores a website’s files? (a) a web server (b) a code editor (c) a web browser
  12. 12.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h4> or <h1>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
  13. 13.✍️ How does a CSS comment start? (a) /* (b) # (c) // (d) <!--
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="300">
  15. 15.Which of these is true of <article>? (a) holds the logo and title (b) holds extra side notes (c) holds one blog post (d) holds copyright notes
  16. 16.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the first one (c) the shorter one (d) the later one
  17. 17.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 240px;
      justify-content: center;
    }
    Inside are 2 boxes, each 60px wide (no margins).
  18. 18.⚡ What number does this code print?
    let coins = 12;
    coins = coins + 7;
    coins = coins - 5;
    console.log(coins);
  19. 19.♿ A part of the page is under a <h4> heading. Which tag should its sub-heading use? (a) <h3> (b) <h6> (c) <h5> (d) <h2>
  20. 20.🖌️ Where does the text sit on its line?
    h1 {
      font-size: 36px;
      color: green;
      background-color: white;
      text-align: center;
    }
    (a) in the middle (b) on the left (c) on the right
  21. 21.True or false: to log out on shared PCs is safe. (a) False (b) True
  22. 22.🔁 When does the else part run? (a) never (b) always (c) when if is true (d) when if is false
  23. 23.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  24. 24.🎯 Can many elements share the same class? (a) No (b) Yes
  25. 25.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the printer (c) only the server (d) nobody
  26. 26.♿ What does good colour contrast mean? (a) no colours at all (b) many bright colours (c) text stands out clearly (d) only red text
  27. 27.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  28. 28.True or false: <td> makes one table row. (a) True (b) False
  29. 29.True or false: a code editor sends pages over the net. (a) True (b) False
  30. 30.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h4>? (a) <h4> (b) <h3> (c) <h1> (d) <h2>
  31. 31.💪 Which flexbox property spaces boxes along a row? (a) flex-direction (b) align-items (c) display: flex (d) justify-content
  32. 32.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  33. 33.True or false: <title> goes in the body. (a) True (b) False
  34. 34.What does background-color do? (a) makes the text bold (b) colours behind the text (c) centres a heading (d) sets the letter colour
  35. 35.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a link (d) a table
  36. 36.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is a game (b) the site is free (c) the site is fast (d) the data is scrambled
  37. 37.📋 What number does the browser show next to “Mango”?
    <ol start="6">
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
  38. 38.🌈 Which colour of light is strongest in rgb(118, 48, 226)? (a) red (b) blue (c) green
  39. 39.⚖️ What colour is the text of this element?
    <h1 class="box" id="intro">Hi</h1>
    CSS:
    #intro { color: yellow; }
    h1 { color: blue; }
    (a) yellow (b) red (c) white (d) blue
  40. 40.🎯 How many elements on a page should have the same id? (a) any number (b) 2 (c) 5 (d) 1

Answer key

  1. <h1 class="big">
  2. not safe
  3. No
  4. No
  5. <a>
  6. line 3
  7. answers page requests
  8. space-between
  9. people who are blind
  10. 38
  11. a web server
  12. <h5>
  13. /*
  14. 300
  15. holds one blog post
  16. the later one
  17. 60
  18. 14
  19. <h5>
  20. in the middle
  21. True
  22. when if is false
  23. in the body
  24. Yes
  25. screen-reader users
  26. text stands out clearly
  27. -->
  28. False
  29. False
  30. <h4>
  31. justify-content
  32. in the body
  33. False
  34. colours behind the text
  35. a line across the page
  36. the data is scrambled
  37. 8
  38. blue
  39. yellow
  40. 1

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