← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 665 · 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 tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
  2. 2.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
  3. 3.✍️ How many declarations (property: value pairs) are in this rule?
    p {
      background-color: yellow;
    }
  4. 4.🔐 Is S0lar!Pen#8 a strong or a weak password? (a) weak (b) strong
  5. 5.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Grapes</li>
    </ul>
    (a) bullets (b) numbers
  6. 6.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as 5 spaces (c) as a dot (d) as one space
  7. 7.🔗 Which address opens when you click this link?
    <a href="quiz.html">Take the quiz</a>
    (a) games.html (b) about.html (c) quiz.html (d) Take the quiz
  8. 8.📝 What does <p> make? (a) a paragraph (b) a link (c) a picture (d) a table
  9. 9.📱 The screen is 820px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 6px;
      }
    }
    (a) Yes (b) No
  10. 10.🌍 What is the protocol in this URL?
    http://www.example.com/about.html
    (a) www.example.com (b) https (c) /about.html (d) http
  11. 11.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 26px;
      }
    }
  12. 12.📱 The screen is 1100px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 20px;
      }
    }
    (a) Yes (b) No
  13. 13.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  14. 14.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 100px;
      padding: 15px;
      border: 4px solid black;
      margin: 20px;
    }
  15. 15.True or false: a web browser saves our .html files. (a) False (b) True
  16. 16.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  17. 17.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) cake.jpg (b) Birthday cake (c) dog.jpg (d) moon.png
  18. 18.Which of these is margin? (a) the line round the box (b) the text or picture (c) space inside the border (d) space outside the border
  19. 19.Which of these goes in the head? (a) <ul> (b) <style> (c) <a> (d) <p>
  20. 20.🌈 Which hex code is blue? (a) #00ff00 (b) #0000ff (c) #ff00ff (d) #ff0000
  21. 21.🛡️ Before typing a password on a site, check the address starts with ___. (a) http (b) https (c) www (d) ftp
  22. 22.⚡ What number does this code print?
    let books = 19;
    books = books + 4;
    books = books - 15;
    console.log(books);
  23. 23.🎯 Which element does the selector #top style? (a) <p id="intro"> (b) <p id="top"> (c) <p class="top"> (d) <h1 class="box">
  24. 24.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h3> or <h5>? (a) <h2> (b) <h3> (c) <h6> (d) <h5>
  25. 25.🔍 One closing tag is missing. Which one?
    <small>The red kite</small>
    <h1>Good morning!
    <b>Rain today</b>
    (a) </b> (b) </small> (c) </h3> (d) </h1>
  26. 26.🔗 Which words do you click on?
    <a href="quiz.html">School news</a>
    (a) Take the quiz (b) quiz.html (c) href (d) School news
  27. 27.True or false: to think before you post is safe. (a) True (b) False
  28. 28.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the first one (c) the later one (d) the shorter one
  29. 29.What does background-color do? (a) makes the text bold (b) makes letters bigger (c) sets the letter colour (d) colours behind the text
  30. 30.🔁 What does this code print?
    let score = 37;
    if (score < 17) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) Play again (b) You win
  31. 31.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 260px;
      justify-content: center;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  32. 32.⚡ Which JavaScript word runs code when true? (a) if (b) let (c) alert() (d) for
  33. 33.Which of these is a closing tag? (a) <body> (b) <li> (c) </h1> (d) <title>
  34. 34.📊 Which tag makes one data cell? (a) <th> (b) <caption> (c) <td> (d) <tr>
  35. 35.🔒 Is the connection to this address scrambled (encrypted)?
    http://learn.example.com/index.html
    (a) Yes (b) No
  36. 36.🌍 What is the protocol in this URL?
    http://www.example.net/news/today.html
    (a) https (b) www.example.net (c) /news/today.html (d) http
  37. 37.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  38. 38.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <p>Good morning!</p>
  39. 39.True or false: <h1> is an empty tag. (a) True (b) False
  40. 40.🎯 Can many elements share the same class? (a) Yes (b) No

Answer key

  1. <img>
  2. <ul>
  3. 1
  4. strong
  5. bullets
  6. as one space
  7. quiz.html
  8. a paragraph
  9. No
  10. http
  11. 20
  12. Yes
  13. in a new tab
  14. 178
  15. False
  16. <ol>
  17. cake.jpg
  18. space outside the border
  19. <style>
  20. #0000ff
  21. https
  22. 8
  23. <p id="top">
  24. <h6>
  25. </h1>
  26. School news
  27. True
  28. the later one
  29. colours behind the text
  30. Play again
  31. 70
  32. if
  33. </h1>
  34. <td>
  35. No
  36. http
  37. an opening tag
  38. 4
  39. False
  40. Yes

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