← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 742 · 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.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  2. 2.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Art Gallery (b) Thanks for visiting. (c) Match report (d) body
  3. 3.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the hr tag (c) the br tag (d) the viewport meta tag
  4. 4.📱 The screen is 414px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (min-width: 1024px) {
      p {
        font-size: 24px;
      }
    }
    (a) No (b) Yes
  5. 5.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  6. 6.True or false: <input type="email"> sends the form. (a) True (b) False
  7. 7.True or false: #main is an id selector. (a) True (b) False
  8. 8.True or false: <ul> is an empty tag. (a) True (b) False
  9. 9.🌈 Which colour is #00ff00? (a) yellow (b) cyan (c) blue (d) bright green
  10. 10.⚖️ Which selector is the weakest? (a) a class selector (b) an element selector (c) an id selector
  11. 11.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) { (d) (
  12. 12.🔍 Which is the odd one out? (a) changes the text size (b) sets colours and fonts (c) reacts to a button click (d) adds space around boxes
  13. 13.⚡ What does this code show?
    let name = "Kabir";
    alert("Hi, " + name + "!");
    (a) Hi, Kabir! (b) Hi, name! (c) Kabir (d) name
  14. 14.🌈 Which colour is rgb(255, 0, 0)? (a) yellow (b) bright green (c) red (d) black
  15. 15.📱 The screen is 320px wide. Does the rule inside @media apply?
    p {
      font-size: 20px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 22px;
      }
    }
    (a) No (b) Yes
  16. 16.📱 The screen is 320px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (min-width: 600px) {
      p {
        font-size: 22px;
      }
    }
    (a) Yes (b) No
  17. 17.🔐 Is Mango#Kite29! a strong or a weak password? (a) weak (b) strong
  18. 18.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
  19. 19.📊 How many rows does this table have?
    <table>
      <tr><td>Papaya</td><td>Guava</td></tr>
      <tr><td>Guava</td><td>Banana</td></tr>
      <tr><td>Jamun</td><td>Jamun</td></tr>
      <tr><td>Banana</td><td>Jamun</td></tr>
    </table>
  20. 20.🚀 Which file should this code go in: h1 { font-size: 32px; } (a) script.js (b) index.html (c) style.css
  21. 21.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
  22. 22.True or false: .note is an element selector. (a) True (b) False
  23. 23.📱 min-width: 800px applies when the screen is ___. (a) 800px or narrower (b) turned off (c) exactly 100px (d) 800px or wider
  24. 24.⚖️ What colour is the text of this element?
    <h2 class="big" id="intro">Hi</h2>
    CSS:
    #intro { color: green; }
    #intro { color: black; }
    (a) blue (b) black (c) green (d) red
  25. 25.⚖️ Which selector is the strongest? (a) an element selector (b) an id selector (c) a class selector
  26. 26.Which colour pair is hard to read? (a) black on white (b) dark grey on white (c) pink on red (d) yellow on black
  27. 27.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  28. 28.✍️ Which sign goes between a property and its value? (a) - (b) ; (c) = (d) :
  29. 29.📊 Are <th> cells shown bold and centred by default? (a) Yes (b) No
  30. 30.🌐 Which one saves our .html files? (a) a web server (b) a web browser (c) a code editor
  31. 31.🌍 Which one is the page’s address? (a) the server (b) the URL (c) the browser (d) HTTPS
  32. 32.🚀 Which tag loads script.js into a page? (a) <link script.js> (b) <js src="script.js"> (c) <script src="script.js"> (d) <a href="script.js">
  33. 33.🎯 Which element does the selector .note style? (a) <h2 id="note"> (b) <li class="red"> (c) <h2 class="big"> (d) <h2 class="note">
  34. 34.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>My best friend</h3>
    <p>Good morning!</p>
    <p>The red kite</p>
  35. 35.🔐 Is iloveyou a strong or a weak password? (a) weak (b) strong
  36. 36.🔍 One closing tag is missing. Which one?
    <b>Hello, world!
    <small>Good morning!</small>
    <h2>Cricket is fun.</h2>
    (a) </b> (b) </small> (c) </p> (d) </h2>
  37. 37.🌈 Which colour is rgb(255, 0, 255)? (a) black (b) white (c) magenta (d) yellow
  38. 38.Which of these is a strong password? (a) abcd1234 (b) 123456 (c) Rain#Drop_42! (d) qwerty
  39. 39.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) red (c) blue (d) black
  40. 40.🎯 Which element does the selector #top style? (a) <p id="top"> (b) <p class="top"> (c) <h1 class="box"> (d) <p id="intro">

Answer key

  1. an opening tag
  2. Match report
  3. the viewport meta tag
  4. No
  5. bullets
  6. False
  7. True
  8. False
  9. bright green
  10. an element selector
  11. <
  12. reacts to a button click
  13. Hi, Kabir!
  14. red
  15. No
  16. No
  17. strong
  18. <ol>
  19. 4
  20. style.css
  21. <!--
  22. False
  23. 800px or wider
  24. black
  25. an id selector
  26. pink on red
  27. numbers
  28. :
  29. Yes
  30. a code editor
  31. the URL
  32. <script src="script.js">
  33. <h2 class="note">
  34. 2
  35. weak
  36. </b>
  37. magenta
  38. Rain#Drop_42!
  39. red
  40. <p id="top">

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