← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 477 · 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.🔗 Where does this link open?
    <a href="games.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  2. 2.✍️ What value is given to color in this rule?
    .box {
      background-color: yellow;
      margin: 10px;
      color: red;
      font-style: italic;
    }
    (a) center (b) red (c) 20px (d) color
  3. 3.🔗 Which words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) Maths fun (b) Art corner (c) contact.html (d) href
  4. 4.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  5. 5.True or false: “images with no alt” helps everyone use the page. (a) False (b) True
  6. 6.True or false: <h1> goes in the body. (a) True (b) False
  7. 7.🖌️ Where does the text sit on its line?
    h1 {
      font-size: 20px;
      color: black;
      background-color: blue;
      text-align: center;
    }
    (a) on the left (b) on the right (c) in the middle
  8. 8.🎯 Which element does the selector h1 style? (a) <h2> (b) <li class="menu"> (c) <h1 class="menu"> (d) <div id="end">
  9. 9.✍️ How many declarations (property: value pairs) are in this rule?
    .box {
      color: red;
    }
  10. 10.🌍 What finds the server for a domain name like example.com? (a) CSS (b) HTML (c) DNS (d) alt
  11. 11.🔗 Where does this link open?
    <a href="news.html" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  12. 12.💪 How wide (px) is each gap between two boxes?
    .row {
      display: flex;
      width: 130px;
      justify-content: space-between;
    }
    Inside are 2 boxes, each 50px wide (no margins).
  13. 13.⚡ What number does this code print?
    let score = 12;
    score = score + 8;
    score = score - 6;
    console.log(score);
  14. 14.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) id (d) src
  15. 15.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) My best friend (c) Good morning!
  16. 16.🌈 In #rrggbb, which colour do the first two digits give? (a) black (b) red (c) blue (d) green
  17. 17.✍️ In color: blue; which part is the property? (a) blue (b) ; (c) : (d) color
  18. 18.What does justify-content: flex-start do? (a) packs boxes at the start (b) puts boxes in the middle (c) equal gaps, none at ends (d) packs boxes at the end
  19. 19.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  20. 20.🎯 Which CSS selector matches this element?
    <li class="menu" id="top">Hello</li>
    (a) #menu (b) .top (c) div (d) li
  21. 21.🎯 Which CSS selector matches this element?
    <h2 class="big" id="logo">Hello</h2>
    (a) #logo (b) li (c) .logo (d) #big
  22. 22.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
  23. 23.📊 How many rows does this table have?
    <table>
      <tr><td>Jamun</td><td>Grapes</td><td>Orange</td><td>Banana</td></tr>
      <tr><td>Grapes</td><td>Mango</td><td>Litchi</td><td>Papaya</td></tr>
      <tr><td>Grapes</td><td>Grapes</td><td>Mango</td><td>Jamun</td></tr>
    </table>
  24. 24.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
  25. 25.✍️ What value is given to margin in this rule?
    li {
      margin: 10px;
      font-size: 20px;
    }
    (a) bold (b) 10px (c) margin (d) 8px
  26. 26.📊 How many cells are in each row?
    <table>
      <tr><td>Orange</td><td>Guava</td><td>Mango</td></tr>
      <tr><td>Orange</td><td>Banana</td><td>Guava</td></tr>
      <tr><td>Jamun</td><td>Banana</td><td>Mango</td></tr>
    </table>
  27. 27.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 8; i++) {
      total = total + 7;
    }
    console.log(total);
  28. 28.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  29. 29.🛡️ Online: is it safe to check for https first? (a) not safe (b) safe
  30. 30.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  31. 31.🔗 Which address opens when you click this link?
    <a href="news.html">Art corner</a>
    (a) news.html (b) quiz.html (c) games.html (d) Art corner
  32. 32.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  33. 33.True or false: “colour as the only clue” helps everyone use the page. (a) True (b) False
  34. 34.True or false: <input type="radio"> lets you tick many. (a) True (b) False
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high</p>
  36. 36.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>The red kite</h2>
    <h2>Good morning!</h2>
    <p>The red kite</p>
  37. 37.🔍 One closing tag is missing. Which one?
    <h1>Our school trip</h1>
    <small>Hello, world!
    <h3>Cricket is fun.</h3>
    (a) </small> (b) </p> (c) </h1> (d) </h3>
  38. 38.Which of these does HTML do? (a) rounds box corners (b) reacts to a button click (c) shows a pop-up message (d) gives the page structure
  39. 39.⚖️ What colour is the text of this element?
    <h2 class="menu" id="top">Hi</h2>
    CSS:
    #top { color: black; }
    #top { color: orange; }
    (a) purple (b) yellow (c) black (d) orange
  40. 40.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor

Answer key

  1. in a new tab
  2. red
  3. Maths fun
  4. <ul>
  5. False
  6. True
  7. in the middle
  8. <h1 class="menu">
  9. 1
  10. DNS
  11. in a new tab
  12. 30
  13. 14
  14. href
  15. Good morning!
  16. red
  17. color
  18. packs boxes at the start
  19. has a closing tag
  20. li
  21. #logo
  22. <li>
  23. 3
  24. <img>
  25. 10px
  26. 3
  27. 56
  28. 5
  29. safe
  30. <ul>
  31. news.html
  32. in the head
  33. False
  34. False
  35. 2
  36. 2
  37. </small>
  38. gives the page structure
  39. orange
  40. a web server

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