← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 911 · 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.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 360px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 100px wide (no margins).
  2. 2.🖌️ What colour is behind the letters?
    p {
      color: black;
      background-color: red;
      text-align: right;
      font-size: 28px;
    }
    (a) yellow (b) black (c) red
  3. 3.True or false: p is a class selector. (a) True (b) False
  4. 4.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) Cricket Club (c) body (d) All about me
  5. 5.🔐 Is qwerty a strong or a weak password? (a) weak (b) strong
  6. 6.🧭 Who is helped most by semantic tags? (a) screen-reader users (b) only the printer (c) only the server (d) nobody
  7. 7.🔁 Which word runs code only when something is true? (a) log (b) if (c) let (d) for
  8. 8.📱 Responsive design means a page ___. (a) never changes (b) fits every screen (c) is only for laptops (d) has no pictures
  9. 9.♿ Who uses a screen reader? (a) only teachers (b) only robots (c) people who are blind (d) only coders
  10. 10.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) Maths fun (b) about.html (c) href (d) Visit the site
  11. 11.Which of these is true of a web server? (a) answers page requests (b) shows pages from the web (c) saves our .html files (d) colours code to help us
  12. 12.📱 The screen is 320px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 26px;
      }
    }
    (a) No (b) Yes
  13. 13.⚡ What number does this code print?
    let a = 13;
    let b = 6;
    console.log(a - b);
  14. 14.🌈 Which colour of light is strongest in rgb(68, 23, 201)? (a) blue (b) green (c) red
  15. 15.♿ Is this heading order correct (no level skipped)?
    <h1> → <h1> → <h1> → <h2>
    (a) No (b) Yes
  16. 16.🌐 Which one shows pages from the web? (a) a web browser (b) a web server (c) a code editor
  17. 17.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
  18. 18.Which of these is margin? (a) space inside the border (b) space outside the border (c) the line round the box (d) the text or picture
  19. 19.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  20. 20.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  21. 21.⚡ What does alert() show? (a) a pop-up box (b) a table (c) a picture (d) a new tab
  22. 22.Which of these is an opening tag? (a) </h1> (b) </p> (c) </title> (d) <li>
  23. 23.True or false: in <img>, width names the picture file. (a) True (b) False
  24. 24.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h2>? (a) <h2> (b) <h4> (c) <h1> (d) <h5>
  25. 25.📋 What number does the browser show next to “Banana”?
    <ol start="7">
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  26. 26.📊 Where do <td> cells go? (a) inside a <p> (b) inside a <tr> (c) inside the <head> (d) inside a <li>
  27. 27.🧩 Which language adds space around boxes? (a) CSS (b) JavaScript (c) HTML
  28. 28.🎯 Which element does the selector .star style? (a) <h1 class="note"> (b) <p id="star"> (c) <p class="menu"> (d) <p class="star">
  29. 29.🔗 Which words do you click on?
    <a href="quiz.html">Play games</a>
    (a) About us (b) Play games (c) href (d) quiz.html
  30. 30.True or false: CSS gives the page structure. (a) True (b) False
  31. 31.⚖️ What colour is the text of this element?
    <h1 class="big" id="top">Hi</h1>
    CSS:
    #top { color: blue; }
    #top { color: green; }
    (a) green (b) orange (c) red (d) blue
  32. 32.♿ Does this help everyone, or make the page harder to use: add alt text to images? (a) helps everyone (b) makes it harder
  33. 33.🧩 Which language makes a form box? (a) CSS (b) HTML (c) JavaScript
  34. 34.🔍 Which line is missing its closing tag?
    line 1: <u>I love mangoes.</u>
    line 2: <em>My pets</em>
    line 3: <small>Cricket is fun.
    (a) line 1 (b) line 2 (c) line 3
  35. 35.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <h2>I love mangoes.</h2>
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <h2>Our school trip</h2>
  36. 36.🔍 Which is the odd one out? (a) counts down a timer (b) shows a pop-up message (c) changes the page live (d) makes headings and lists
  37. 37.🚀 Which file should this code go in: score = score + 1; (a) script.js (b) index.html (c) style.css
  38. 38.🌈 Which colour is #00ff00? (a) red (b) white (c) blue (d) bright green
  39. 39.📱 The screen is 375px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 24px;
      }
    }
  40. 40.🔁 What does this code print?
    let score = 29;
    if (score < 45) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) You win (b) Play again

Answer key

  1. 60
  2. red
  3. False
  4. All about me
  5. weak
  6. screen-reader users
  7. if
  8. fits every screen
  9. people who are blind
  10. Visit the site
  11. answers page requests
  12. No
  13. 7
  14. blue
  15. Yes
  16. a web browser
  17. 6
  18. space outside the border
  19. in the body
  20. <ul>
  21. a pop-up box
  22. <li>
  23. False
  24. <h5>
  25. 9
  26. inside a <tr>
  27. CSS
  28. <p class="star">
  29. Play games
  30. False
  31. green
  32. helps everyone
  33. HTML
  34. line 3
  35. 4
  36. makes headings and lists
  37. script.js
  38. bright green
  39. 16
  40. You win

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