← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 201 · 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.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) body (b) Welcome! (c) Art Gallery (d) Mars is red.
  2. 2.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 240px;
      justify-content: space-between;
    }
    Inside are 2 boxes, each 80px wide (no margins).
  3. 3.True or false: <h1> goes in the body. (a) False (b) True
  4. 4.📱 Which tag helps phones show a page at the right size? (a) the hr tag (b) the viewport meta tag (c) the br tag (d) the title tag
  5. 5.True or false: the border is the text or picture. (a) True (b) False
  6. 6.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  7. 7.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Planets (c) body (d) Cricket Club
  8. 8.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) at the bottom (d) on the browser tab
  9. 9.⚡ What does this code print? (Look at the quotes!)
    let x = "1";
    let y = 6;
    console.log(x + y);
    (a) 16 (b) Error (c) 7
  10. 10.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <script src="script.js"> (c) <js src="script.js"> (d) <link script.js>
  11. 11.🌍 What is the domain name in this URL?
    https://www.example.com/about.html
    (a) kids.example.org (b) /about.html (c) www.example.com (d) https
  12. 12.🎯 Can many elements share the same class? (a) Yes (b) No
  13. 13.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 20; i = i + 2) {
      console.log(i);
    }
  14. 14.📊 In a table, which tag is a row? (a) <td> (b) <tb> (c) <tr> (d) <th>
  15. 15.🌍 What is the domain name in this URL?
    https://learn.example.com/index.html
    (a) /index.html (b) learn.example.com (c) https (d) www.example.com
  16. 16.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) white (c) red (d) black
  17. 17.🖌️ Which CSS property colours behind the text? (a) color (b) font-family (c) background-color (d) text-align
  18. 18.True or false: <caption> gives the table a title. (a) False (b) True
  19. 19.True or false: margin is the gap to other boxes. (a) True (b) False
  20. 20.✍️ What value is given to text-align in this rule?
    h2 {
      border: 2px solid;
      font-style: italic;
      text-align: center;
    }
    (a) center (b) text-align (c) yellow (d) 10px
  21. 21.True or false: JavaScript makes a link. (a) True (b) False
  22. 22.Which of these goes in the head? (a) <a> (b) <h1> (c) <table> (d) <link rel="stylesheet">
  23. 23.Which of these is true of <article>? (a) holds copyright notes (b) is the page’s key part (c) holds a news story (d) holds extra side notes
  24. 24.🔁 What does i++ do? (a) takes 1 from i (b) prints i (c) doubles i (d) adds 1 to i
  25. 25.🔁 What does this code print?
    let temp = 21;
    if (temp >= 37) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Cool (b) Hot
  26. 26.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  27. 27.✍️ How does a CSS comment start? (a) # (b) <!-- (c) /* (d) //
  28. 28.🔢 On a typical page, from top to bottom, which comes LAST? (a) <header> (b) <nav> (c) <main> (d) <footer>
  29. 29.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) body (c) Welcome! (d) Here is my best one.
  30. 30.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  31. 31.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) ( (d) [
  32. 32.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</body>”? (a) </body> (b) <!DOCTYPE html>
  33. 33.🖌️ Where does the text sit on its line?
    h2 {
      color: green;
      font-size: 24px;
      text-align: left;
      background-color: purple;
    }
    (a) on the right (b) in the middle (c) on the left
  34. 34.⚡ What number does this code print?
    let apples = 26;
    apples = apples + 6;
    apples = apples - 13;
    console.log(apples);
  35. 35.📝 Which tag gives a form box a name you can click? (a) <h1> (b) <label> (c) <hr> (d) <title>
  36. 36.♿ What does good colour contrast mean? (a) only red text (b) no colours at all (c) text stands out clearly (d) many bright colours
  37. 37.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <p> (c) <title> (d) <meta charset="utf-8">
  38. 38.True or false: to tell a trusted adult is not safe. (a) False (b) True
  39. 39.🔗 Which address opens when you click this link?
    <a href="quiz.html">About us</a>
    (a) games.html (b) about.html (c) quiz.html (d) About us
  40. 40.Which colour pair is easy to read? (a) light grey on white (b) yellow on black (c) red on green (d) yellow on white

Answer key

  1. Welcome!
  2. 80
  3. True
  4. the viewport meta tag
  5. False
  6. in the body
  7. Planets
  8. on the browser tab
  9. 16
  10. <script src="script.js">
  11. www.example.com
  12. Yes
  13. 18
  14. <tr>
  15. learn.example.com
  16. red
  17. background-color
  18. True
  19. True
  20. center
  21. False
  22. <link rel="stylesheet">
  23. holds a news story
  24. adds 1 to i
  25. Cool
  26. has a closing tag
  27. /*
  28. <footer>
  29. Welcome!
  30. 6
  31. <
  32. <!DOCTYPE html>
  33. on the left
  34. 19
  35. <label>
  36. text stands out clearly
  37. <p>
  38. False
  39. quiz.html
  40. yellow on black

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