← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 240 · 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 goes in the head? (a) <img> (b) <p> (c) <meta charset="utf-8"> (d) <a>
  2. 2.Which of these is true of <footer>? (a) holds the menu of links (b) sits at the bottom (c) holds one blog post (d) helps you move around
  3. 3.📱 min-width: 800px applies when the screen is ___. (a) exactly 100px (b) 800px or narrower (c) 800px or wider (d) turned off
  4. 4.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  5. 5.⚡ What number does this code print?
    let a = 32;
    let b = 7;
    console.log(a - b);
  6. 6.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <table> (d) <style>
  7. 7.🚀 Which file is best for the colours and fonts? (a) index.html (b) style.css (c) script.js (d) photo.jpg
  8. 8.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </html> (c) <!DOCTYPE html> (d) <html>
  9. 9.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h2> or <h4>? (a) <h2> (b) <h6> (c) <h5> (d) <h4>
  10. 10.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 220px;
      justify-content: center;
    }
    Inside are 3 boxes, each 40px wide (no margins).
  11. 11.True or false: <header> sits at the very top. (a) True (b) False
  12. 12.🎯 What kind of selector is #top? (a) an element selector (b) an id selector (c) a class selector
  13. 13.🔢 When you open a web page, what comes right after “you type the URL”? (a) the server sends files (b) the browser asks it (c) DNS finds the server (d) the browser shows it
  14. 14.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  15. 15.Which of these is an empty tag? (a) <hr> (b) <b> (c) <li> (d) <p>
  16. 16.🔠 Are headings shown in bold by default? (a) No (b) Yes
  17. 17.🌍 What do we call the computer that stores a website? (a) a server (b) a printer (c) a mouse (d) a keyboard
  18. 18.True or false: JavaScript puts a picture on a page. (a) False (b) True
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing<br>Rivers flow<br>Stars shine<br>Kites fly high</p>
  20. 20.🖌️ What colour is behind the letters?
    p {
      font-size: 20px;
      color: orange;
      background-color: red;
      text-align: left;
    }
    (a) purple (b) red (c) orange
  21. 21.🧩 Which language changes the text size? (a) CSS (b) HTML (c) JavaScript
  22. 22.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 6px;
      }
    }
    (a) Yes (b) No
  23. 23.⚡ What number does this code print?
    let a = 2;
    let b = 8;
    console.log(a * b);
  24. 24.🛡️ Online: is it safe to log out on shared PCs? (a) not safe (b) safe
  25. 25.🖌️ Where does the text sit on its line?
    h1 {
      text-align: right;
      background-color: red;
      color: blue;
      font-size: 28px;
    }
    (a) in the middle (b) on the left (c) on the right
  26. 26.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) Thanks for visiting. (c) All about me (d) Riya’s Recipes
  27. 27.🔗 Which address opens when you click this link?
    <a href="quiz.html">Play games</a>
    (a) games.html (b) about.html (c) quiz.html (d) Play games
  28. 28.🏷️ Which is the closing tag for <p>? (a) <\p> (b) <p> (c) <p/> (d) </p>
  29. 29.🎯 What kind of selector is #hero? (a) an element selector (b) an id selector (c) a class selector
  30. 30.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>My pets</h2>
    <h2>Good morning!</h2>
    <h2>My best friend</h2>
    <p>The red kite</p>
  31. 31.🔢 To build and share your first web page, which comes first: “test in a browser” or “write the HTML”? (a) write the HTML (b) test in a browser
  32. 32.🧭 Which semantic tag holds the main content? (a) <header> (b) <footer> (c) <nav> (d) <main>
  33. 33.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) Contact us (b) Visit the site (c) https://example.com (d) href
  34. 34.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    (a) Cricket is fun. (b) Hello, world! (c) Good morning!
  35. 35.🧩 Which language makes headings and lists? (a) HTML (b) JavaScript (c) CSS
  36. 36.🧭 Is <header> semantic or not semantic? (a) semantic (b) not semantic
  37. 37.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Match report (b) index.html (c) I like to read. (d) Class 7 Blog
  38. 38.📝 Which input type picks a day? (a) radio (b) text (c) number (d) date
  39. 39.True or false: HTML on its own can run a game loop. (a) True (b) False
  40. 40.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*

Answer key

  1. <meta charset="utf-8">
  2. sits at the bottom
  3. 800px or wider
  4. an opening tag
  5. 25
  6. <table>
  7. style.css
  8. </html>
  9. <h6>
  10. 50
  11. True
  12. an id selector
  13. DNS finds the server
  14. True
  15. <hr>
  16. Yes
  17. a server
  18. False
  19. 5
  20. red
  21. CSS
  22. Yes
  23. 16
  24. safe
  25. on the right
  26. All about me
  27. quiz.html
  28. </p>
  29. an id selector
  30. 2
  31. write the HTML
  32. <main>
  33. Contact us
  34. Cricket is fun.
  35. HTML
  36. semantic
  37. Class 7 Blog
  38. date
  39. False
  40. <!--

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