← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 388 · 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.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Mango</li>
    </ul>
  2. 2.True or false: <input type="submit"> lets you pick only one. (a) True (b) False
  3. 3.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  4. 4.Which of these is a closing tag? (a) <h1> (b) <body> (c) <b> (d) </b>
  5. 5.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  6. 6.📱 Which tag helps phones show a page at the right size? (a) the br tag (b) the hr tag (c) the viewport meta tag (d) the title tag
  7. 7.🔗 Which words do you click on?
    <a href="art.html">Contact us</a>
    (a) Visit the site (b) href (c) Contact us (d) art.html
  8. 8.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to make it bigger (d) to load it faster
  9. 9.True or false: <ul> goes inside ul or ol. (a) True (b) False
  10. 10.🌈 Which colour is #00ff00? (a) bright green (b) white (c) red (d) yellow
  11. 11.Which of these is not safe to do online? (a) share your OTP (b) think before you post (c) use a strong password (d) use a nickname in games
  12. 12.📝 How many <input> tags are in this form?
    <form>
      <input type="date">
      <input type="text">
      <input type="email">
      <input type="number">
      <input type="password">
      <input type="submit" value="Send">
    </form>
  13. 13.True or false: <li> is an empty tag. (a) True (b) False
  14. 14.Which of these is an opening tag? (a) </p> (b) </body> (c) <h1> (d) </title>
  15. 15.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) <body> (b) </body>
  16. 16.🌈 Which colour of light is strongest in rgb(229, 3, 95)? (a) red (b) green (c) blue
  17. 17.True or false: <img> goes in the head. (a) False (b) True
  18. 18.Which of these does JavaScript do? (a) rounds box corners (b) shows a pop-up message (c) changes the text size (d) adds space around boxes
  19. 19.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) Easy snacks (c) Class 7 Blog (d) index.html
  20. 20.⚡ Which JavaScript word runs code when true? (a) console.log() (b) if (c) for (d) alert()
  21. 21.🚀 Which file should this code go in: <p>Hello!</p> (a) style.css (b) index.html (c) script.js
  22. 22.🔁 When does the else part run? (a) never (b) always (c) when if is false (d) when if is true
  23. 23.⚖️ What colour is the text of this element?
    <h1 class="menu" id="logo">Hi</h1>
    CSS:
    h1 { color: black; }
    h1 { color: red; }
    (a) purple (b) red (c) orange (d) black
  24. 24.⚖️ What colour is the text of this element?
    <h1 class="star" id="top">Hi</h1>
    CSS:
    #top { color: green; }
    h1 { color: black; }
    .star { color: red; }
    (a) yellow (b) black (c) green (d) red
  25. 25.♿ A part of the page is under a <h4> heading. Which tag should its sub-heading use? (a) <h6> (b) <h1> (c) <h5> (d) <h4>
  26. 26.True or false: .card is a class selector. (a) False (b) True
  27. 27.⚡ Which word makes a new variable? (a) make (b) put (c) let (d) give
  28. 28.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Birds sing</p>
  29. 29.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>My pets</p>
    <h4>Rain today</h4>
    <h2>My pets</h2>
    <h4>Rain today</h4>
  30. 30.✍️ Which property is set to italic in this rule?
    .box {
      text-align: center;
      width: 300px;
      font-size: 20px;
      font-style: italic;
    }
    (a) font-size (b) color (c) font-style (d) italic
  31. 31.What is <input type="text"> for? (a) picks a day (b) is for an email address (c) is for one line of words (d) lets you tick many
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
    <p>My pets</p>
    <p>Good morning!</p>
    <p>Fun facts</p>
  33. 33.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  34. 34.🔢 In a basic web page file, which comes first: “<head>” or “<html>”? (a) <head> (b) <html>
  35. 35.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
  36. 36.⚖️ What colour is the text of this element?
    <h2 class="note" id="main">Hi</h2>
    CSS:
    #main { color: white; }
    #main { color: green; }
    (a) blue (b) green (c) black (d) white
  37. 37.🚀 Which file should this code go in: <img src="cat.png"> (a) script.js (b) index.html (c) style.css
  38. 38.🎯 Which CSS selector matches this element?
    <div class="note" id="end">Hello</div>
    (a) #note (b) span (c) #end (d) .big
  39. 39.True or false: <ul> lists steps in order. (a) False (b) True
  40. 40.🔁 How many times does this code print “Hello”?
    for (let i = 0; i < 3; i++) {
      console.log("Hello");
    }

Answer key

  1. 4
  2. False
  3. Yes
  4. </b>
  5. 2
  6. the viewport meta tag
  7. Contact us
  8. to describe the image
  9. False
  10. bright green
  11. share your OTP
  12. 6
  13. False
  14. <h1>
  15. <body>
  16. red
  17. False
  18. shows a pop-up message
  19. Class 7 Blog
  20. if
  21. index.html
  22. when if is false
  23. red
  24. green
  25. <h5>
  26. True
  27. let
  28. 3
  29. 4
  30. font-style
  31. is for one line of words
  32. 4
  33. <ul>
  34. <html>
  35. 3
  36. green
  37. index.html
  38. #end
  39. False
  40. 3

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