← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 509 · 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 sign ends each CSS declaration? (a) ; (b) : (c) . (d) ,
  2. 2.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Litchi</td><td>Orange</td><td>Guava</td><td>Guava</td></tr>
    </table>
  3. 3.🔐 Is abcd1234 a strong or a weak password? (a) strong (b) weak
  4. 4.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Match report (b) index.html (c) Mars is red. (d) My Hobbies
  5. 5.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
  6. 6.🧭 Is <main> semantic or not semantic? (a) not semantic (b) semantic
  7. 7.📱 max-width: 600px applies when the screen is ___. (a) 600px or narrower (b) 600px or wider (c) turned off (d) exactly 1000px
  8. 8.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
  9. 9.💪 Which justify-content value packs boxes at the start? (a) flex-start (b) space-between (c) flex-end (d) center
  10. 10.True or false: margin is the gap round content. (a) True (b) False
  11. 11.🔁 What does this code print?
    let temp = 2;
    if (temp >= 15) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Cool (b) Hot
  12. 12.🛡️ Online: is it safe to think before you post? (a) safe (b) not safe
  13. 13.🔍 Which is the odd one out? (a) changes the text size (b) lays out the page (c) rounds box corners (d) checks a quiz answer
  14. 14.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    (a) Fun facts (b) The red kite (c) Hello, world!
  15. 15.⚖️ Two rules with the same selector set a colour. Which one wins? (a) the shorter one (b) the first one (c) the later one (d) neither
  16. 16.🎯 Which element does the selector li style? (a) <div> (b) <span class="menu"> (c) <li class="menu"> (d) <p id="main">
  17. 17.🔗 Which address opens when you click this link?
    <a href="news.html">School news</a>
    (a) quiz.html (b) School news (c) news.html (d) games.html
  18. 18.🎯 Which CSS selector matches this element?
    <h1 class="menu" id="top">Hello</h1>
    (a) .top (b) h2 (c) h1 (d) #intro
  19. 19.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>My best friend</h2>
    <h2>Hello, world!</h2>
    <h2>My pets</h2>
  20. 20.Which of these is padding? (a) the gap round content (b) the gap to other boxes (c) the line round the box (d) a solid or dotted edge
  21. 21.🔗 Which address opens when you click this link?
    <a href="maths.html">Art corner</a>
    (a) art.html (b) Art corner (c) maths.html (d) news.html
  22. 22.Which of these is a strong password? (a) 111111 (b) abcd1234 (c) riya2014 (d) Chai$Cup_19x
  23. 23.What does background-color do? (a) makes the text bold (b) picks the font style (c) colours behind the text (d) sets the letter colour
  24. 24.🔢 In a basic web page file, which comes first: “</html>” or “</body>”? (a) </body> (b) </html>
  25. 25.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="150">
    (a) fort.jpg (b) bus.jpg (c) Our school bus (d) tiger.jpg
  26. 26.🔁 What does this code print?
    let temp = 13;
    if (temp >= 13) {
      console.log("Hot");
    } else {
      console.log("Cool");
    }
    (a) Hot (b) Cool
  27. 27.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) ( (d) [
  28. 28.🌍 What is the protocol in this URL?
    https://www.example.net/art/gallery.html
    (a) www.example.net (b) http (c) /art/gallery.html (d) https
  29. 29.⚖️ Which selector is the strongest? (a) a class selector (b) an id selector (c) an element selector
  30. 30.True or false: in <img>, src names the picture file. (a) False (b) True
  31. 31.🎯 What kind of selector is .star? (a) an id selector (b) a class selector (c) an element selector
  32. 32.📱 The screen is 414px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 22px;
      }
    }
    (a) No (b) Yes
  33. 33.💪 Which justify-content value packs boxes at the end? (a) center (b) flex-end (c) flex-start (d) space-between
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Birds sing</p>
  35. 35.♿ Does this help everyone, or make the page harder to use: link text “click here”? (a) helps everyone (b) makes it harder
  36. 36.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
  37. 37.📦 How wide (px) is this box from the outer edge of its left border to the outer edge of its right border?
    .box {
      width: 70px;
      padding: 20px;
      border: 1px solid black;
      margin: 15px;
    }
  38. 38.What does font-size do? (a) centres a heading (b) sets the letter colour (c) makes letters bigger (d) picks the font style
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="300">
    (a) Map of India (b) A red kite (c) width (d) kite.png
  40. 40.True or false: JavaScript changes the page live. (a) False (b) True

Answer key

  1. ;
  2. 8
  3. weak
  4. My Hobbies
  5. <img>
  6. semantic
  7. 600px or narrower
  8. -->
  9. flex-start
  10. False
  11. Cool
  12. safe
  13. checks a quiz answer
  14. The red kite
  15. the later one
  16. <li class="menu">
  17. news.html
  18. h1
  19. 1
  20. the gap round content
  21. maths.html
  22. Chai$Cup_19x
  23. colours behind the text
  24. </body>
  25. bus.jpg
  26. Hot
  27. <
  28. https
  29. an id selector
  30. True
  31. a class selector
  32. No
  33. flex-end
  34. 3
  35. makes it harder
  36. <!--
  37. 112
  38. makes letters bigger
  39. A red kite
  40. True

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