← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 36 · 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.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
  2. 2.📋 Which tag goes around each item of a list? (a) <li> (b) <ol> (c) <p> (d) <ul>
  3. 3.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 260px;
      justify-content: center;
    }
    Inside are 2 boxes, each 60px wide (no margins).
  4. 4.🔍 Which is the odd one out? (a) turns HTML into a page (b) sends pages over the net (c) has an address bar (d) opens web pages for us
  5. 5.📊 Which tag makes one data cell? (a) <table> (b) <tr> (c) <td> (d) <caption>
  6. 6.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  7. 7.⚡ Which JavaScript word writes in the console? (a) console.log() (b) let (c) alert() (d) for
  8. 8.🌈 Hex digits go 0 to 9, then A to which letter? (a) F (b) G (c) Z (d) J
  9. 9.🔗 Which address opens when you click this link?
    <a href="art.html">Contact us</a>
    (a) news.html (b) Contact us (c) quiz.html (d) art.html
  10. 10.True or false: #top { color: blue; } goes in index.html. (a) False (b) True
  11. 11.🚀 Which file should this code go in: <p>Hello!</p> (a) script.js (b) style.css (c) index.html
  12. 12.🧭 Is <article> semantic or not semantic? (a) not semantic (b) semantic
  13. 13.Which of these is true of a code editor? (a) shows line numbers (b) sends pages over the net (c) shows pages from the web (d) answers page requests
  14. 14.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  15. 15.✍️ What value is given to font-weight in this rule?
    p {
      color: red;
      font-weight: bold;
      font-size: 20px;
    }
    (a) 300px (b) bold (c) font-weight (d) 2px solid
  16. 16.⚖️ What colour is the text of this element?
    <h2 class="red" id="end">Hi</h2>
    CSS:
    #end { color: blue; }
    h2 { color: red; }
    (a) green (b) black (c) blue (d) red
  17. 17.True or false: <th> gives the table a title. (a) True (b) False
  18. 18.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the later one (b) the shorter one (c) the first one (d) neither
  19. 19.🎯 What kind of selector is p? (a) a class selector (b) an id selector (c) an element selector
  20. 20.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 220px;
      padding: 25px;
      border: 1px solid black;
      margin: 5px;
    }
  21. 21.🛡️ Should you share your password with your best friend? (a) Yes (b) No
  22. 22.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it blank (d) makes it bold
  23. 23.🎯 How many elements on a page should have the same id? (a) 2 (b) 5 (c) 1 (d) any number
  24. 24.🔗 Which address opens when you click this link?
    <a href="https://example.com">Play games</a>
    (a) art.html (b) Play games (c) https://example.com (d) maths.html
  25. 25.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is fast (b) the site is a game (c) the site is free (d) the data is scrambled
  26. 26.📱 Responsive design means a page ___. (a) never changes (b) is only for laptops (c) has no pictures (d) fits every screen
  27. 27.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 480px;
      justify-content: space-between;
    }
    Inside are 4 boxes, each 60px wide (no margins).
  28. 28.🔁 What does this code print?
    let score = 13;
    if (score > 14) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) Play again (b) You win
  29. 29.🔢 In a basic web page file, which comes first: “</head>” or “</html>”? (a) </html> (b) </head>
  30. 30.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 130px;
      padding: 25px;
      border: 2px solid black;
      margin: 20px;
    }
  31. 31.True or false: li is an element selector. (a) True (b) False
  32. 32.🔗 Which address opens when you click this link?
    <a href="maths.html">Contact us</a>
    (a) Contact us (b) maths.html (c) news.html (d) art.html
  33. 33.📄 Can HTML on its own count button clicks? (a) Yes (b) No
  34. 34.True or false: in <img>, src sets how tall it is. (a) False (b) True
  35. 35.Which of these is true of <nav>? (a) holds one blog post (b) holds a side box of tips (c) holds the menu of links (d) holds extra side notes
  36. 36.💪 How much empty space (px) is left after the last box?
    .row {
      display: flex;
      width: 280px;
      justify-content: flex-start;
    }
    Inside are 4 boxes, each 50px wide (no margins).
  37. 37.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  38. 38.🌈 In #rrggbb, which colour do the last two digits give? (a) red (b) green (c) white (d) blue
  39. 39.✍️ What value is given to color in this rule?
    h1 {
      border: 2px solid;
      padding: 8px;
      background-color: yellow;
      color: red;
    }
    (a) center (b) 20px (c) red (d) color
  40. 40.🌍 Which program shows a web page to us? (a) a web browser (b) a calculator (c) a music player (d) a paint program

Answer key

  1. an attribute
  2. <li>
  3. 70
  4. sends pages over the net
  5. <td>
  6. True
  7. console.log()
  8. F
  9. art.html
  10. False
  11. index.html
  12. semantic
  13. shows line numbers
  14. has a closing tag
  15. bold
  16. blue
  17. False
  18. the later one
  19. an element selector
  20. 272
  21. No
  22. opens it in a new tab
  23. 1
  24. https://example.com
  25. the data is scrambled
  26. fits every screen
  27. 80
  28. Play again
  29. </head>
  30. 224
  31. True
  32. maths.html
  33. No
  34. False
  35. holds the menu of links
  36. 80
  37. an opening tag
  38. blue
  39. red
  40. a web browser

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