← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 338 · 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 of these is a weak password? (a) S0lar!Pen#8 (b) Kite_Fl1es@Dawn (c) riya2014 (d) Blue@Tiger_74
  2. 2.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  3. 3.⚡ What number does this code print?
    let books = 20;
    books = books + 4;
    books = books - 8;
    console.log(books);
  4. 4.✍️ Which property is set to red in this rule?
    .note {
      text-align: center;
      color: red;
      padding: 8px;
    }
    (a) red (b) font-size (c) text-align (d) color
  5. 5.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 280px;
      padding: 15px;
      border: 3px solid black;
      margin: 0px;
    }
  6. 6.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 440px;
      justify-content: center;
    }
    Inside are 4 boxes, each 100px wide (no margins).
  7. 7.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>My pets</p>
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
    <h3>Fun facts</h3>
  8. 8.Which of these is true of a web server? (a) shows pages from the web (b) is where we type code (c) stores a website’s files (d) shows line numbers
  9. 9.🚀 Which file should this code go in: p { color: red; } (a) index.html (b) script.js (c) style.css
  10. 10.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 240px;
      justify-content: center;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  11. 11.What does font-weight do? (a) sets the letter colour (b) colours behind the text (c) centres a heading (d) makes the text bold
  12. 12.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  13. 13.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
  14. 14.🛡️ Online: is it safe to ask before downloading? (a) not safe (b) safe
  15. 15.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the first one (b) neither (c) the later one (d) the shorter one
  16. 16.🔍 Which is the odd one out? (a) shows a pop-up message (b) reacts to a button click (c) adds space around boxes (d) checks a quiz answer
  17. 17.🔁 What does i++ do? (a) takes 1 from i (b) prints i (c) doubles i (d) adds 1 to i
  18. 18.🔁 What does this code print?
    let age = 3;
    if (age >= 12) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  19. 19.True or false: <li> shows bullet points. (a) True (b) False
  20. 20.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
  21. 21.💾 A web page file usually ends with which extension? (a) .mp3 (b) .txt (c) .html (d) .png
  22. 22.📱 The screen is 1366px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 10px;
      }
    }
  23. 23.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="200">
    (a) dog.jpg (b) moon.png (c) A happy dog (d) bus.jpg
  24. 24.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>My pets</p> -->
  25. 25.True or false: <h1> goes in the head. (a) False (b) True
  26. 26.⚡ Which JavaScript word makes a new variable? (a) let (b) alert() (c) if (d) console.log()
  27. 27.⚡ What does JavaScript add to a web page? (a) the domain name (b) only colours (c) actions and changes (d) the page title
  28. 28.🧭 Which semantic tag sits at the very top? (a) <main> (b) <article> (c) <header> (d) <footer>
  29. 29.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) blue (d) red
  30. 30.🔁 What does this code print?
    let marks = 6;
    if (marks >= 38) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  31. 31.📄 Can HTML on its own make tables? (a) Yes (b) No
  32. 32.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) A happy dog (b) Birthday cake (c) cake.jpg (d) width
  33. 33.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) body (b) I like to read. (c) Class 7 Blog (d) All about me
  34. 34.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) makes a list (d) adds a picture
  35. 35.🎯 Which element does the selector .box style? (a) <span class="box"> (b) <span class="star"> (c) <span id="box"> (d) <p class="menu">
  36. 36.🔢 On a typical page, from top to bottom, what comes right after “<nav>”? (a) <header> (b) <main> (c) <footer>
  37. 37.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>My pets</p>
    <p>Fun facts</p>
    <h4>Rain today</h4>
  38. 38.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  39. 39.🖌️ Which CSS property centres a heading? (a) font-size (b) font-family (c) font-weight (d) text-align
  40. 40.🚀 Which file should this code go in: <p>Hello!</p> (a) index.html (b) style.css (c) script.js

Answer key

  1. riya2014
  2. <a>
  3. 16
  4. color
  5. 316
  6. 20
  7. 3
  8. stores a website’s files
  9. style.css
  10. 70
  11. makes the text bold
  12. has a closing tag
  13. False
  14. safe
  15. the later one
  16. adds space around boxes
  17. adds 1 to i
  18. child
  19. False
  20. 6
  21. .html
  22. 12
  23. dog.jpg
  24. 1
  25. False
  26. let
  27. actions and changes
  28. <header>
  29. red
  30. Try again
  31. Yes
  32. Birthday cake
  33. All about me
  34. starts a new line
  35. <span class="box">
  36. <main>
  37. 2
  38. an empty tag
  39. text-align
  40. index.html

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