← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 878 · 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 CSS selector matches this element?
    <li class="menu" id="intro">Hello</li>
    (a) .intro (b) #main (c) #menu (d) #intro
  2. 2.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
  3. 3.🔗 Where does this link open?
    <a href="news.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  4. 4.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h4> → <h5>
    (a) Yes (b) No
  5. 5.✍️ Which sign goes between a property and its value? (a) = (b) ; (c) : (d) -
  6. 6.🌍 What do we call the computer that stores a website? (a) a keyboard (b) a mouse (c) a printer (d) a server
  7. 7.Which of these is true of a code editor? (a) turns HTML into a page (b) has an address bar (c) opens web pages for us (d) saves our .html files
  8. 8.🌈 In #rrggbb, which colour do the last two digits give? (a) white (b) green (c) red (d) blue
  9. 9.🌐 Which one answers page requests? (a) a web server (b) a web browser (c) a code editor
  10. 10.What does justify-content: flex-start do? (a) equal gaps, none at ends (b) packs boxes at the start (c) puts boxes in the middle (d) packs boxes at the end
  11. 11.♿ What does good colour contrast mean? (a) no colours at all (b) only red text (c) text stands out clearly (d) many bright colours
  12. 12.Which of these is true of <main>? (a) holds a side box of tips (b) holds the main content (c) holds extra side notes (d) helps you move around
  13. 13.True or false: let score = 0; goes in style.css. (a) False (b) True
  14. 14.🌗 Is white on dark blue easy or hard to read? (a) hard to read (b) easy to read
  15. 15.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  16. 16.🌍 What finds the server for a domain name like example.com? (a) CSS (b) HTML (c) DNS (d) alt
  17. 17.True or false: to meet an online stranger is safe. (a) True (b) False
  18. 18.📊 How many rows does this table have?
    <table>
      <tr><td>Grapes</td><td>Jamun</td><td>Grapes</td><td>Papaya</td></tr>
      <tr><td>Orange</td><td>Banana</td><td>Jamun</td><td>Litchi</td></tr>
    </table>
  19. 19.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <\strong> (c) </strong> (d) <strong>
  20. 20.🎯 What kind of selector is .note? (a) an element selector (b) a class selector (c) an id selector
  21. 21.⚖️ What colour is the text of this element?
    <h1 class="box" id="hero">Hi</h1>
    CSS:
    h1 { color: white; }
    h1 { color: purple; }
    (a) purple (b) green (c) blue (d) white
  22. 22.True or false: to download from pop-ups is safe. (a) False (b) True
  23. 23.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Match report (c) body (d) We won by 5 runs.
  24. 24.🚀 Which file is best for code that reacts to clicks? (a) script.js (b) style.css (c) index.html (d) notes.txt
  25. 25.Which colour pair is hard to read? (a) white on dark blue (b) black on white (c) dark grey on white (d) red on green
  26. 26.✍️ What value is given to margin in this rule?
    h1 {
      text-align: center;
      margin: 10px;
    }
    (a) 10px (b) bold (c) margin (d) 8px
  27. 27.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
  28. 28.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
  29. 29.📊 How many heading cells (<th>) does this table have?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Grapes</td><td>Papaya</td></tr>
      <tr><td>Litchi</td><td>Orange</td></tr>
      <tr><td>Litchi</td><td>Banana</td></tr>
    </table>
  30. 30.📱 Responsive design means a page ___. (a) never changes (b) is only for laptops (c) has no pictures (d) fits every screen
  31. 31.✍️ Which sign ends each CSS declaration? (a) : (b) . (c) ; (d) ,
  32. 32.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>I love mangoes.</h4>
    <h3>Cricket is fun.</h3>
    <h3>Our school trip</h3>
  33. 33.True or false: the content is space inside the border. (a) False (b) True
  34. 34.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 24px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 18px;
      }
    }
  35. 35.🔗 Where does this link open?
    <a href="maths.html">About us</a>
    (a) in a new tab (b) in the same tab
  36. 36.🎨 Which tag connects an outside CSS file? (a) <link> (b) <a> (c) <css> (d) <img>
  37. 37.✍️ What value is given to font-size in this rule?
    h1 {
      background-color: yellow;
      font-size: 20px;
      padding: 8px;
      width: 300px;
    }
    (a) 20px (b) yellow (c) center (d) font-size
  38. 38.📊 How many cells does this table have in all?
    <table>
      <tr><th>Name</th><th>Fruit</th></tr>
      <tr><td>Jamun</td><td>Orange</td></tr>
      <tr><td>Guava</td><td>Grapes</td></tr>
      <tr><td>Papaya</td><td>Litchi</td></tr>
    </table>
  39. 39.✍️ What value is given to padding in this rule?
    h1 {
      font-weight: bold;
      background-color: yellow;
      padding: 8px;
      font-size: 20px;
    }
    (a) 2px solid (b) bold (c) padding (d) 8px
  40. 40.⚖️ What colour is the text of this element?
    <h1 class="big" id="intro">Hi</h1>
    CSS:
    h1 { color: white; }
    h1 { color: green; }
    (a) white (b) yellow (c) red (d) green

Answer key

  1. #intro
  2. <ol>
  3. in a new tab
  4. No
  5. :
  6. a server
  7. saves our .html files
  8. blue
  9. a web server
  10. packs boxes at the start
  11. text stands out clearly
  12. holds the main content
  13. False
  14. easy to read
  15. an empty tag
  16. DNS
  17. False
  18. 2
  19. </strong>
  20. a class selector
  21. purple
  22. False
  23. Match report
  24. script.js
  25. red on green
  26. 10px
  27. a line across the page
  28. <
  29. 2
  30. fits every screen
  31. ;
  32. 4
  33. False
  34. 18
  35. in the same tab
  36. <link>
  37. 20px
  38. 8
  39. 8px
  40. green

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