← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 316 · 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.🖌️ What colour are the letters?
    li {
      text-align: left;
      background-color: black;
      font-size: 36px;
      color: blue;
    }
    (a) black (b) green (c) blue
  2. 2.⚡ What does this code print? (Look at the quotes!)
    let x = "8";
    let y = 3;
    console.log(x + y);
    (a) Error (b) 11 (c) 83
  3. 3.True or false: JavaScript changes the page live. (a) False (b) True
  4. 4.🖌️ How big is the text, in px?
    h2 {
      text-align: right;
      font-size: 20px;
      background-color: orange;
      color: yellow;
    }
  5. 5.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 110px;
      padding: 20px;
      border: 2px solid black;
      margin: 0px;
    }
  6. 6.♿ Which link text is clearest? (a) click here (b) link (c) Read the fruit facts (d) here
  7. 7.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  8. 8.🌈 Which colour of light is strongest in rgb(224, 137, 113)? (a) green (b) blue (c) red
  9. 9.♿ Does this help everyone, or make the page harder to use: skipping heading levels? (a) helps everyone (b) makes it harder
  10. 10.✍️ How many declarations (property: value pairs) are in this rule?
    li {
      font-weight: bold;
      border: 2px solid;
      background-color: yellow;
    }
  11. 11.True or false: alert("Hi"); goes in style.css. (a) True (b) False
  12. 12.✍️ CSS declarations go inside which brackets? (a) ( ) (b) { } (c) [ ] (d) < >
  13. 13.Which of these is safe to do online? (a) share your OTP (b) download from pop-ups (c) meet an online stranger (d) ask before downloading
  14. 14.True or false: in <img>, alt sets how wide it is. (a) True (b) False
  15. 15.📝 Which tag gives a form box a name you can click? (a) <label> (b) <hr> (c) <h1> (d) <title>
  16. 16.True or false: a web server stores a website’s files. (a) True (b) False
  17. 17.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
  18. 18.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Fun facts</p> -->
  19. 19.🔗 Where does this link open?
    <a href="quiz.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  20. 20.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="100">
  21. 21.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 220px;
      justify-content: center;
    }
    Inside are 3 boxes, each 60px wide (no margins).
  22. 22.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  23. 23.✍️ What value is given to font-size in this rule?
    body {
      border: 2px solid;
      margin: 10px;
      font-size: 20px;
    }
    (a) center (b) font-size (c) yellow (d) 20px
  24. 24.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a comment (d) a closing tag
  25. 25.📱 What does a media query check? (a) the battery level (b) the time of day (c) the page title (d) the screen width
  26. 26.🔍 Which line is missing its closing tag?
    line 1: <em>I love mangoes.</em>
    line 2: <h2>Rain today
    line 3: <i>My best friend</i>
    (a) line 2 (b) line 3 (c) line 1
  27. 27.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  28. 28.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    (a) I love mangoes. (b) Fun facts (c) Our school trip
  29. 29.🚀 Which file is best for code that reacts to clicks? (a) index.html (b) notes.txt (c) script.js (d) style.css
  30. 30.True or false: <li> is one item of a list. (a) True (b) False
  31. 31.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h3>The red kite</h3>
    <h3>The red kite</h3>
  32. 32.🧭 Why use <nav> instead of <div> for a menu? (a) it tells its meaning (b) it adds pictures (c) it loads faster (d) it makes text red
  33. 33.♿ What does good colour contrast mean? (a) text stands out clearly (b) many bright colours (c) only red text (d) no colours at all
  34. 34.🖌️ What colour is behind the letters?
    p {
      background-color: blue;
      color: yellow;
      text-align: right;
      font-size: 32px;
    }
    (a) orange (b) blue (c) yellow
  35. 35.🌈 In #00e900 the green part is the hex number e9. What is it as a normal number?
  36. 36.🖌️ How big is the text, in px?
    li {
      color: white;
      background-color: blue;
      font-size: 20px;
      text-align: center;
    }
  37. 37.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 10 (d) 6
  38. 38.⚖️ Which selector is the weakest? (a) an element selector (b) a class selector (c) an id selector
  39. 39.🌗 Is black on white easy or hard to read? (a) hard to read (b) easy to read
  40. 40.⚡ What does this code print? (Look at the quotes!)
    let x = "1";
    let y = 5;
    console.log(x + y);
    (a) 15 (b) Error (c) 6

Answer key

  1. blue
  2. 83
  3. True
  4. 20
  5. 154
  6. Read the fruit facts
  7. in the body
  8. red
  9. makes it harder
  10. 3
  11. False
  12. { }
  13. ask before downloading
  14. False
  15. <label>
  16. True
  17. <!DOCTYPE html>
  18. 2
  19. in the same tab
  20. 100
  21. 20
  22. numbers
  23. 20px
  24. an attribute
  25. the screen width
  26. line 2
  27. an opening tag
  28. Fun facts
  29. script.js
  30. True
  31. 3
  32. it tells its meaning
  33. text stands out clearly
  34. blue
  35. 233
  36. 20
  37. 1
  38. an element selector
  39. easy to read
  40. 15

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