← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 995 · 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 <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  2. 2.📝 Which input type is for one line of words? (a) date (b) password (c) checkbox (d) text
  3. 3.⚖️ What colour is the text of this element?
    <h2 class="note" id="intro">Hi</h2>
    CSS:
    h2 { color: yellow; }
    #intro { color: red; }
    (a) black (b) red (c) orange (d) yellow
  4. 4.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) My Hobbies (b) Easy snacks (c) Thanks for visiting. (d) index.html
  5. 5.🔗 Which address opens when you click this link?
    <a href="maths.html">Play games</a>
    (a) maths.html (b) art.html (c) Play games (d) news.html
  6. 6.📊 How many cells are in each row?
    <table>
      <tr><td>Mango</td><td>Mango</td></tr>
      <tr><td>Banana</td><td>Mango</td></tr>
      <tr><td>Litchi</td><td>Guava</td></tr>
    </table>
  7. 7.📱 The screen is 320px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 20px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 28px;
      }
    }
  8. 8.🌈 In #rrggbb, which colour do the first two digits give? (a) green (b) black (c) red (d) blue
  9. 9.🌍 What is the protocol in this URL?
    https://www.example.com/games/chess.html
    (a) http (b) www.example.com (c) https (d) /games/chess.html
  10. 10.True or false: HTML on its own cannot keep a high score. (a) False (b) True
  11. 11.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Rain today</p>
    <h2>My best friend</h2>
    <p>My best friend</p>
    <p>I love mangoes.</p>
  12. 12.📝 Which tag makes a drop-down list? (a) <ol> (b) <select> (c) <ul> (d) <li>
  13. 13.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) element (d) attribute
  14. 14.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) </h3> (c) <h3> (d) <h3/>
  15. 15.🌈 Which colour of light is strongest in rgb(121, 76, 228)? (a) red (b) blue (c) green
  16. 16.⚡ What number does this code print?
    let books = 14;
    books = books + 11;
    books = books - 17;
    console.log(books);
  17. 17.🚀 Which file should this code go in: body { margin: 0; } (a) style.css (b) script.js (c) index.html
  18. 18.✍️ How many declarations (property: value pairs) are in this rule?
    .box {
      border: 2px solid;
      font-size: 20px;
    }
  19. 19.🌍 What is the protocol in this URL?
    https://school.example.in/index.html
    (a) https (b) http (c) school.example.in (d) /index.html
  20. 20.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  21. 21.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  22. 22.⚖️ What colour is the text of this element?
    <h1 class="menu" id="intro">Hi</h1>
    CSS:
    .menu { color: green; }
    .menu { color: black; }
    (a) green (b) blue (c) yellow (d) black
  23. 23.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
  24. 24.🔍 Which is the odd one out? (a) hosts websites online (b) sends pages over the net (c) opens web pages for us (d) answers page requests
  25. 25.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) https://example.com (b) Visit the site (c) href (d) Contact us
  26. 26.🚀 Which file should this code go in: <ul><li>Art</li></ul> (a) index.html (b) script.js (c) style.css
  27. 27.🖌️ How big is the text, in px?
    h1 {
      font-size: 32px;
      color: black;
      text-align: left;
      background-color: green;
    }
  28. 28.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
  29. 29.🖌️ Which CSS property sets the letter colour? (a) font-size (b) font-family (c) background-color (d) color
  30. 30.🌈 Which hex code is yellow? (a) #ff0000 (b) #ffff00 (c) #ff00ff (d) #00ffff
  31. 31.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
  32. 32.🌈 Which hex code is cyan? (a) #ffff00 (b) #ffffff (c) #00ffff (d) #ff00ff
  33. 33.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    (a) My pets (b) Hello, world! (c) Good morning! (d) Cricket is fun.
  34. 34.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
  35. 35.🛡️ Online: is it safe to share your OTP? (a) not safe (b) safe
  36. 36.🔍 Which line is missing its closing tag?
    line 1: <h1>Rain today
    line 2: <u>Our school trip</u>
    line 3: <b>Fun facts</b>
    (a) line 3 (b) line 2 (c) line 1
  37. 37.⚖️ What colour is the text of this element?
    <h2 class="note" id="main">Hi</h2>
    CSS:
    #main { color: white; }
    h2 { color: blue; }
    .note { color: black; }
    (a) blue (b) orange (c) black (d) white
  38. 38.✍️ What value is given to padding in this rule?
    #top {
      padding: 8px;
      margin: 10px;
      width: 300px;
      font-style: italic;
    }
    (a) bold (b) 8px (c) padding (d) 2px solid
  39. 39.📊 Which tag holds the whole table? (a) <th> (b) <caption> (c) <table> (d) <tr>
  40. 40.📱 min-width: 800px applies when the screen is ___. (a) 800px or wider (b) exactly 100px (c) 800px or narrower (d) turned off

Answer key

  1. an opening tag
  2. text
  3. red
  4. My Hobbies
  5. maths.html
  6. 2
  7. 20
  8. red
  9. https
  10. True
  11. 4
  12. <select>
  13. element
  14. </h3>
  15. blue
  16. 8
  17. style.css
  18. 2
  19. https
  20. href
  21. an empty tag
  22. black
  23. <!DOCTYPE html>
  24. opens web pages for us
  25. Contact us
  26. index.html
  27. 32
  28. a web browser
  29. color
  30. #ffff00
  31. 2
  32. #00ffff
  33. Good morning!
  34. 300
  35. not safe
  36. line 1
  37. white
  38. 8px
  39. <table>
  40. 800px or wider

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