← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 570 · 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.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) wires (d) tags
  2. 2.True or false: HTML makes a link. (a) True (b) False
  3. 3.⚖️ Which selector is the strongest? (a) an element selector (b) an id selector (c) a class selector
  4. 4.🌍 Which one scrambles data on its way? (a) the server (b) the browser (c) the URL (d) HTTPS
  5. 5.✍️ Which property is set to italic in this rule?
    body {
      margin: 10px;
      font-style: italic;
      text-align: center;
    }
    (a) italic (b) color (c) font-style (d) font-size
  6. 6.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) adds a picture (d) makes a list
  7. 7.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>Our school trip</h2>
    <h2>Hello, world!</h2>
    <p>Rain today</p>
    <p>Rain today</p>
    <h2>Rain today</h2>
  8. 8.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 140px;
      padding: 10px;
      border: 2px solid black;
      margin: 10px;
    }
  9. 9.⚡ What does this code print? (Look at the quotes!)
    let x = "4";
    let y = 8;
    console.log(x + y);
    (a) 48 (b) 12 (c) Error
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="350">
  11. 11.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
  12. 12.🌈 Which colour is #00ff00? (a) black (b) bright green (c) blue (d) magenta
  13. 13.Which of these is a closing tag? (a) <b> (b) <body> (c) <li> (d) </h1>
  14. 14.📦 In the box model, which part is space inside the border? (a) content (b) margin (c) padding (d) border
  15. 15.True or false: HTML on its own can keep a high score. (a) True (b) False
  16. 16.True or false: <h1> is an empty tag. (a) True (b) False
  17. 17.✍️ What is the selector in this CSS rule?
    #top {
      font-size: 20px;
      width: 300px;
      text-align: center;
    }
    (a) 300px (b) li (c) font-size (d) #top
  18. 18.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
  19. 19.🔁 How many times does this code print “Hello”?
    for (let i = 3; i < 7; i++) {
      console.log("Hello");
    }
  20. 20.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  21. 21.Which of these goes in the head? (a) <img> (b) <h1> (c) <a> (d) <meta charset="utf-8">
  22. 22.📱 The screen is 1366px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 22px;
      }
    }
    (a) No (b) Yes
  23. 23.🚀 What is the home page file of a website usually called? (a) main.png (b) home.css (c) index.html (d) start.js
  24. 24.🎨 Which attribute adds CSS inside one tag? (a) href (b) src (c) alt (d) style
  25. 25.Which of these is true of a web browser? (a) opens web pages for us (b) shows line numbers (c) sends pages over the net (d) colours code to help us
  26. 26.🎯 What kind of selector is li? (a) a class selector (b) an element selector (c) an id selector
  27. 27.True or false: in <img>, height names the picture file. (a) True (b) False
  28. 28.🔗 Where does this link open?
    <a href="maths.html">About us</a>
    (a) in a new tab (b) in the same tab
  29. 29.Which of these is the border? (a) the text or picture (b) space outside the border (c) a solid or dotted edge (d) the gap to other boxes
  30. 30.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
  31. 31.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to leave notes (d) to show pictures
  32. 32.🔢 In a basic web page file, which comes LAST? (a) <head> (b) <html> (c) </html> (d) </body>
  33. 33.True or false: the server shows the page to you. (a) True (b) False
  34. 34.Which of these is an empty tag? (a) <li> (b) <h1> (c) <ul> (d) <br>
  35. 35.💬 How does an HTML comment end? (a) // (b) --> (c) */ (d) >>
  36. 36.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  37. 37.What is <input type="radio"> for? (a) is for an email address (b) lets you tick many (c) lets you pick only one (d) hides what you type
  38. 38.⚡ Which JavaScript word runs code when true? (a) for (b) if (c) let (d) alert()
  39. 39.🔍 Which is the odd one out? (a) hosts websites online (b) answers page requests (c) sends pages over the net (d) shows pages from the web
  40. 40.✍️ What is the selector in this CSS rule?
    p {
      text-align: center;
      font-size: 20px;
      font-weight: bold;
      padding: 8px;
    }
    (a) text-align (b) .note (c) p (d) 20px

Answer key

  1. tags
  2. True
  3. an id selector
  4. HTTPS
  5. font-style
  6. starts a new line
  7. 3
  8. 184
  9. 48
  10. 350
  11. an attribute
  12. bright green
  13. </h1>
  14. padding
  15. False
  16. False
  17. #top
  18. <ul>
  19. 4
  20. No
  21. <meta charset="utf-8">
  22. No
  23. index.html
  24. style
  25. opens web pages for us
  26. an element selector
  27. False
  28. in the same tab
  29. a solid or dotted edge
  30. <a>
  31. to leave notes
  32. </html>
  33. False
  34. <br>
  35. -->
  36. <ul>
  37. lets you pick only one
  38. if
  39. shows pages from the web
  40. p

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