← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 521 · 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 an opening tag? (a) </p> (b) </h1> (c) <b> (d) </li>
  2. 2.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) the later one (c) the first one (d) neither
  3. 3.📦 In the box model, which part is space inside the border? (a) margin (b) padding (c) border (d) content
  4. 4.⚖️ Which selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
  5. 5.📊 How many rows does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Jamun</td><td>Litchi</td></tr>
      <tr><td>Litchi</td><td>Banana</td></tr>
      <tr><td>Guava</td><td>Litchi</td></tr>
    </table>
  6. 6.🚀 Which file should this code go in: score = score + 1; (a) script.js (b) index.html (c) style.css
  7. 7.🧩 Which language sets colours and fonts? (a) HTML (b) CSS (c) JavaScript
  8. 8.🖌️ What colour are the letters?
    h1 {
      color: blue;
      background-color: green;
      font-size: 16px;
      text-align: center;
    }
    (a) green (b) blue (c) black
  9. 9.⚖️ What colour is the text of this element?
    <h2 class="menu" id="intro">Hi</h2>
    CSS:
    h2 { color: black; }
    h2 { color: purple; }
    (a) yellow (b) purple (c) orange (d) black
  10. 10.🔢 On a typical page, from top to bottom, which comes first: “<header>” or “<main>”? (a) <header> (b) <main>
  11. 11.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 8px;
      }
    }
  12. 12.🔢 When you open a web page, what comes right after “you type the URL”? (a) the browser shows it (b) the server sends files (c) the browser asks it (d) DNS finds the server
  13. 13.🖌️ What colour are the letters?
    h1 {
      color: purple;
      text-align: left;
      font-size: 40px;
      background-color: green;
    }
    (a) purple (b) green (c) black
  14. 14.True or false: <ul> is an empty tag. (a) False (b) True
  15. 15.⚡ What does this code show?
    let name = "Aman";
    console.log("Well done, " + name + "!");
    (a) Aman (b) name (c) Well done, name! (d) Well done, Aman!
  16. 16.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <ol> (d) <br>
  17. 17.True or false: to check for https first is safe. (a) True (b) False
  18. 18.🌈 Which colour is #0000ff? (a) magenta (b) blue (c) yellow (d) red
  19. 19.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <ol> (d) <p>
  20. 20.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) href (b) About us (c) games.html (d) Play games
  21. 21.🔁 How many numbers does this code print?
    for (let i = 0; i < 19; i = i + 4) {
      console.log(i);
    }
  22. 22.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) All about me (b) index.html (c) Try this poha. (d) My Hobbies
  23. 23.True or false: <header> holds copyright notes. (a) True (b) False
  24. 24.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 150px;
      padding: 15px;
      border: 3px solid black;
      margin: 10px;
    }
  25. 25.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 210px;
      justify-content: flex-start;
    }
    Inside are 3 boxes, each 60px wide (no margins).
  26. 26.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>The red kite</h3>
    <p>The red kite</p>
    <p>Good morning!</p>
    <p>The red kite</p>
  27. 27.Which of these is true of a web server? (a) opens web pages for us (b) saves our .html files (c) stores a website’s files (d) shows pages from the web
  28. 28.🛡️ Online: is it safe to keep passwords secret? (a) safe (b) not safe
  29. 29.True or false: a web server sends pages over the net. (a) False (b) True
  30. 30.🔢 In a basic web page file, which comes LAST? (a) </head> (b) <html> (c) </body> (d) </html>
  31. 31.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h6> or <h3>? (a) <h1> (b) <h6> (c) <h2> (d) <h3>
  32. 32.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
  33. 33.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h3> (b) <h4> (c) <h1> (d) <h2>
  34. 34.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">About us</a>
    (a) in the same tab (b) in a new tab
  35. 35.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  36. 36.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <\h2> (c) <h2> (d) <h2/>
  37. 37.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  38. 38.True or false: li is an element selector. (a) False (b) True
  39. 39.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) quiz.html (b) news.html (c) Play games (d) games.html
  40. 40.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) structure (d) colours

Answer key

  1. <b>
  2. the later one
  3. padding
  4. an id selector
  5. 4
  6. script.js
  7. CSS
  8. blue
  9. purple
  10. <header>
  11. 8
  12. DNS finds the server
  13. purple
  14. False
  15. Well done, Aman!
  16. <ol>
  17. True
  18. blue
  19. <li>
  20. Play games
  21. 5
  22. My Hobbies
  23. False
  24. 206
  25. 30
  26. 2
  27. stores a website’s files
  28. safe
  29. True
  30. </html>
  31. <h1>
  32. a web browser
  33. <h3>
  34. in a new tab
  35. No
  36. </h2>
  37. in the body
  38. True
  39. news.html
  40. structure

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