← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 990 · 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.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  2. 2.🔐 Is 123456 a strong or a weak password? (a) strong (b) weak
  3. 3.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  4. 4.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 110px;
      padding: 10px;
      border: 2px solid black;
      margin: 0px;
    }
  5. 5.⚡ What number does this code print?
    let a = 13;
    let b = 37;
    console.log(a + b);
  6. 6.⚡ What does this code print? (Look at the quotes!)
    let x = "7";
    let y = 6;
    console.log(x + y);
    (a) Error (b) 13 (c) 76
  7. 7.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 10px;
      }
    }
    (a) Yes (b) No
  8. 8.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
  9. 9.What does text-align do? (a) picks the font style (b) colours behind the text (c) centres a heading (d) sets the letter colour
  10. 10.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 19; i = i + 3) {
      console.log(i);
    }
  11. 11.True or false: body { margin: 0; } goes in script.js. (a) True (b) False
  12. 12.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) src (d) alt
  13. 13.🌈 Which colour of light is strongest in rgb(78, 175, 65)? (a) red (b) green (c) blue
  14. 14.♿ Does this help everyone, or make the page harder to use: colour as the only clue? (a) makes it harder (b) helps everyone
  15. 15.🔗 Where does this link open?
    <a href="about.html">Play games</a>
    (a) in the same tab (b) in a new tab
  16. 16.🔗 Which words do you click on?
    <a href="maths.html">School news</a>
    (a) Take the quiz (b) href (c) School news (d) maths.html
  17. 17.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) </head>
  18. 18.🧭 Who is helped most by semantic tags? (a) only the server (b) only the printer (c) nobody (d) screen-reader users
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="150">
    (a) Map of India (b) kite.png (c) A red kite (d) width
  20. 20.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Easy snacks (b) Here is my best one. (c) body (d) Class 7 Blog
  21. 21.🛡️ Online: is it safe to use a strong password? (a) safe (b) not safe
  22. 22.True or false: <img src="cat.png"> goes in style.css. (a) False (b) True
  23. 23.🔢 When you open a web page, which comes LAST? (a) the browser shows it (b) the server sends files (c) you type the URL (d) DNS finds the server
  24. 24.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 180px;
      padding: 10px;
      border: 3px solid black;
      margin: 20px;
    }
  25. 25.📝 Which tag makes a big box for many lines of text? (a) <br> (b) <textarea> (c) <p> (d) <input>
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="300">
    (a) An old fort (b) width (c) Our school bus (d) bus.jpg
  27. 27.⚡ What number does this code print?
    let runs = 15;
    runs = runs + 15;
    runs = runs - 1;
    console.log(runs);
  28. 28.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <h2>Fun facts</h2>
  29. 29.True or false: to keep passwords secret is safe. (a) True (b) False
  30. 30.✍️ CSS declarations go inside which brackets? (a) ( ) (b) [ ] (c) < > (d) { }
  31. 31.🎯 Which element does the selector div style? (a) <p class="star"> (b) <span> (c) <h1 id="hero"> (d) <div class="star">
  32. 32.True or false: <a href="a.html">Go</a> goes in script.js. (a) True (b) False
  33. 33.🔁 When does the else part run? (a) when if is true (b) always (c) when if is false (d) never
  34. 34.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  35. 35.🌈 Which colour is rgb(0, 255, 0)? (a) yellow (b) magenta (c) bright green (d) red
  36. 36.What does font-family do? (a) colours behind the text (b) makes the text bold (c) centres a heading (d) picks the font style
  37. 37.True or false: the URL is the page’s address. (a) True (b) False
  38. 38.True or false: a web browser stores a website’s files. (a) False (b) True
  39. 39.📦 In the box model, which part is the gap to other boxes? (a) padding (b) content (c) border (d) margin
  40. 40.🧩 Which language checks a quiz answer? (a) CSS (b) HTML (c) JavaScript

Answer key

  1. in the head
  2. weak
  3. has a closing tag
  4. 134
  5. 50
  6. 76
  7. Yes
  8. href
  9. centres a heading
  10. 18
  11. False
  12. alt
  13. green
  14. makes it harder
  15. in the same tab
  16. School news
  17. <!DOCTYPE html>
  18. screen-reader users
  19. A red kite
  20. Easy snacks
  21. safe
  22. False
  23. the browser shows it
  24. 246
  25. <textarea>
  26. Our school bus
  27. 29
  28. 3
  29. True
  30. { }
  31. <div class="star">
  32. False
  33. when if is false
  34. <ul>
  35. bright green
  36. picks the font style
  37. True
  38. False
  39. margin
  40. JavaScript

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