← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 239 · 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 the connection to this address scrambled (encrypted)?
    http://www.example.net/about.html
    (a) Yes (b) No
  2. 2.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 180px;
      justify-content: center;
    }
    Inside are 2 boxes, each 80px wide (no margins).
  3. 3.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h1>? (a) <h2> (b) <h3> (c) <h1> (d) <h4>
  4. 4.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h3> or <h5>? (a) <h6> (b) <h3> (c) <h2> (d) <h5>
  5. 5.📝 What does a password box show instead of letters? (a) dots (b) emojis (c) numbers (d) capital letters
  6. 6.🎯 What kind of selector is .note? (a) an id selector (b) an element selector (c) a class selector
  7. 7.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h2> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
  8. 8.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
  9. 9.🖌️ Which CSS property makes letters bigger? (a) text-align (b) color (c) font-size (d) font-weight
  10. 10.🔁 How many times does this code print “Hello”?
    for (let i = 0; i <= 7; i++) {
      console.log("Hello");
    }
  11. 11.True or false: the content is the line round the box. (a) False (b) True
  12. 12.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  13. 13.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  14. 14.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
  15. 15.🖌️ Where does the text sit on its line?
    p {
      background-color: blue;
      text-align: left;
      font-size: 40px;
      color: orange;
    }
    (a) on the right (b) in the middle (c) on the left
  16. 16.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) My drawings (c) body (d) Space Facts
  17. 17.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  18. 18.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  19. 19.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) alt (c) height (d) src
  20. 20.📊 How many rows does this table have?
    <table>
      <tr><td>Banana</td><td>Litchi</td></tr>
      <tr><td>Grapes</td><td>Banana</td></tr>
      <tr><td>Papaya</td><td>Guava</td></tr>
    </table>
  21. 21.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  22. 22.🚀 Which file should this code go in: alert(score); (a) script.js (b) style.css (c) index.html
  23. 23.True or false: .note is an element selector. (a) True (b) False
  24. 24.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 190px;
      padding: 5px;
      border: 5px solid black;
      margin: 10px;
    }
  25. 25.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Fun facts</p>
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) My pets (b) Fun facts (c) The red kite (d) Cricket is fun.
  26. 26.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) body (b) Here is my best one. (c) Match report (d) Art Gallery
  27. 27.Which of these is true of a code editor? (a) answers page requests (b) stores a website’s files (c) colours code to help us (d) has an address bar
  28. 28.True or false: padding is space inside the border. (a) True (b) False
  29. 29.📊 Are <th> cells shown bold and centred by default? (a) No (b) Yes
  30. 30.Which of these is an opening tag? (a) </body> (b) <li> (c) </b> (d) </li>
  31. 31.⚖️ Which selector is the strongest? (a) an element selector (b) a class selector (c) an id selector
  32. 32.🖌️ Which CSS property makes the text bold? (a) font-size (b) font-weight (c) background-color (d) color
  33. 33.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Guava</td><td>Banana</td><td>Orange</td><td>Banana</td></tr>
    </table>
  34. 34.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  35. 35.⚖️ What colour is the text of this element?
    <h2 class="red" id="main">Hi</h2>
    CSS:
    h2 { color: yellow; }
    #main { color: red; }
    .red { color: white; }
    (a) yellow (b) red (c) purple (d) white
  36. 36.🔗 What does HyperText mean? (a) very big text (b) secret text (c) text in colour (d) text with links
  37. 37.What does justify-content: flex-start do? (a) equal gaps, none at ends (b) packs boxes at the end (c) packs boxes at the start (d) puts boxes in the middle
  38. 38.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  39. 39.📝 Which input type lets you pick only one? (a) radio (b) submit (c) email (d) password
  40. 40.🔁 What does this code print?
    let marks = 25;
    if (marks < 21) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass

Answer key

  1. No
  2. 10
  3. <h1>
  4. <h2>
  5. dots
  6. a class selector
  7. <h6>
  8. <ul>
  9. font-size
  10. 8
  11. False
  12. in the head
  13. Yes
  14. the body
  15. on the left
  16. My drawings
  17. an empty tag
  18. in the head
  19. alt
  20. 3
  21. <ol>
  22. script.js
  23. False
  24. 230
  25. Cricket is fun.
  26. Match report
  27. colours code to help us
  28. True
  29. Yes
  30. <li>
  31. an id selector
  32. font-weight
  33. 4
  34. Yes
  35. red
  36. text with links
  37. packs boxes at the start
  38. No
  39. radio
  40. Try again

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