← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 942 · 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 colour is rgb(0, 255, 255)? (a) cyan (b) yellow (c) black (d) bright green
  2. 2.What is <input type="submit"> for? (a) is for an email address (b) is for one line of words (c) sends the form (d) lets you pick only one
  3. 3.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) tiger.jpg (b) An old fort (c) fort.jpg (d) kite.png
  4. 4.Which of these is a weak password? (a) password (b) Kite_Fl1es@Dawn (c) Chai$Cup_19x (d) Mango#Kite29!
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Stars shine<br>Birds sing</p>
  6. 6.🔍 Which is the odd one out? (a) puts a picture on a page (b) checks a quiz answer (c) makes a form box (d) gives the page structure
  7. 7.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
  8. 8.🛡️ Online: is it safe to share your password? (a) not safe (b) safe
  9. 9.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  10. 10.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
  11. 11.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as one space (d) as a new line
  12. 12.✍️ How many declarations (property: value pairs) are in this rule?
    h2 {
      font-weight: bold;
      color: red;
      margin: 10px;
      text-align: center;
    }
  13. 13.True or false: #top is an element selector. (a) False (b) True
  14. 14.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <p>Good morning!</p>
    <p>Our school trip</p>
  15. 15.🔐 Is abcd1234 a strong or a weak password? (a) weak (b) strong
  16. 16.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  17. 17.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) address (d) editor
  18. 18.⚡ What does this code show?
    let name = "Meera";
    console.log("Hi, " + name + "!");
    (a) name (b) Hi, Meera! (c) Hi, name! (d) Meera
  19. 19.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <html> (c) <body> (d) </head>
  20. 20.📦 How much space top to bottom (px) does this box take in all, margin included?
    .box {
      height: 130px;
      padding: 15px;
      border: 4px solid black;
      margin: 5px;
    }
  21. 21.🌈 Which colour is rgb(0, 0, 0)? (a) black (b) white (c) yellow (d) bright green
  22. 22.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
  23. 23.📄 What is the big heading shown on 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) body (c) Class 7 Blog (d) Easy snacks
  24. 24.♿ Does this help everyone, or make the page harder to use: images with no alt? (a) helps everyone (b) makes it harder
  25. 25.📝 Which tag makes a big box for many lines of text? (a) <p> (b) <br> (c) <input> (d) <textarea>
  26. 26.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) src (c) height (d) width
  27. 27.📊 Which tag gives the table a title? (a) <table> (b) <td> (c) <caption> (d) <tr>
  28. 28.⚡ What number does this code print?
    let a = 38;
    let b = 3;
    console.log(a + b);
  29. 29.Which of these is true of a web browser? (a) opens web pages for us (b) is where we type code (c) answers page requests (d) shows line numbers
  30. 30.🧩 Which language changes the text size? (a) JavaScript (b) HTML (c) CSS
  31. 31.🔢 On a typical page, from top to bottom, which comes first: “<main>” or “<footer>”? (a) <main> (b) <footer>
  32. 32.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>My best friend</p>
    <h3>My pets</h3>
  33. 33.True or false: HTML on its own can run a game loop. (a) False (b) True
  34. 34.🔍 Which line is missing its closing tag?
    line 1: <small>Rain today</small>
    line 2: <u>Cricket is fun.</u>
    line 3: <h1>My best friend
    (a) line 1 (b) line 2 (c) line 3
  35. 35.True or false: the border is the line round the box. (a) False (b) True
  36. 36.⚡ Which JavaScript word makes a new variable? (a) let (b) if (c) alert() (d) console.log()
  37. 37.🔁 How many times does this code print “Well done”?
    for (let i = 3; i <= 10; i++) {
      console.log("Well done");
    }
  38. 38.True or false: <input type="submit"> picks a day. (a) False (b) True
  39. 39.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  40. 40.🔁 How many times does this code print “Well done”?
    for (let i = 0; i <= 5; i++) {
      console.log("Well done");
    }

Answer key

  1. cyan
  2. sends the form
  3. fort.jpg
  4. password
  5. 4
  6. checks a quiz answer
  7. on the browser tab
  8. not safe
  9. in the body
  10. a slash /
  11. as one space
  12. 4
  13. False
  14. 4
  15. weak
  16. 6
  17. element
  18. Hi, Meera!
  19. </html>
  20. 178
  21. black
  22. 5
  23. Easy snacks
  24. makes it harder
  25. <textarea>
  26. src
  27. <caption>
  28. 41
  29. opens web pages for us
  30. CSS
  31. <main>
  32. 2
  33. False
  34. line 3
  35. True
  36. let
  37. 8
  38. False
  39. a closing tag
  40. 6

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