← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 47 · 40 questions
TalentJR

Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.

NameDateTime takenScore ___ / 40
  1. 1.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) attribute (d) address
  2. 2.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <ul> (d) <br>
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <p>My pets</p>
    line 2: <strong>My best friend
    line 3: <em>Rain today</em>
    (a) line 3 (b) line 2 (c) line 1
  4. 4.True or false: HTML on its own cannot make headings. (a) False (b) True
  5. 5.🔍 One closing tag is missing. Which one?
    <small>Hello, world!</small>
    <em>Fun facts
    <i>The red kite</i>
    (a) </i> (b) </em> (c) </h3> (d) </small>
  6. 6.📄 Where does the text of <title> appear? (a) nowhere (b) in a big heading (c) at the bottom (d) on the browser tab
  7. 7.🔗 Which tag makes a clickable link? (a) <img> (b) <a> (c) <link> (d) <p>
  8. 8.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) has an address bar (d) answers page requests
  9. 9.📄 Can HTML on its own make headings? (a) Yes (b) No
  10. 10.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) index.html (c) Welcome! (d) Class 7 Blog
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="350">
    (a) width (b) kite.png (c) Map of India (d) A red kite
  12. 12.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
  13. 13.Which of these is true of a web browser? (a) is where we type code (b) shows line numbers (c) answers page requests (d) opens web pages for us
  14. 14.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  15. 15.True or false: <ul> lists steps in order. (a) True (b) False
  16. 16.True or false: in <img>, alt describes the picture. (a) True (b) False
  17. 17.True or false: <h1> is an empty tag. (a) True (b) False
  18. 18.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Fun facts</p>
    <p>Rain today</p>
  19. 19.Which of these goes in the body? (a) <title> (b) <h1> (c) <link rel="stylesheet"> (d) <style>
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    (a) Rain today (b) Good morning! (c) I love mangoes.
  21. 21.🔍 Which line is missing its closing tag?
    line 1: <h2>My best friend
    line 2: <em>Rain today</em>
    line 3: <u>The red kite</u>
    (a) line 1 (b) line 2 (c) line 3
  22. 22.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  23. 23.🔗 What does HyperText mean? (a) text in colour (b) very big text (c) text with links (d) secret text
  24. 24.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow</p>
  25. 25.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <h2>Good morning!</h2>
    <p>Good morning!</p>
    <p>The red kite</p>
  26. 26.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="250">
  27. 27.Which of these is a closing tag? (a) </body> (b) <body> (c) <li> (d) <b>
  28. 28.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) All about me (c) index.html (d) My Hobbies
  29. 29.🏷️ Which is the closing tag for <h3>? (a) <\h3> (b) <h3> (c) </h3> (d) <h3/>
  30. 30.Which of these is an empty tag? (a) <br> (b) <p> (c) <h1> (d) <li>
  31. 31.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h2> or <h4>? (a) <h2> (b) <h4> (c) <h5> (d) <h6>
  32. 32.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) Class 7 Blog (c) index.html (d) My drawings
  33. 33.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  34. 34.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  35. 35.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
  36. 36.🔗 Where does this link open?
    <a href="games.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  37. 37.🔠 Are headings shown in bold by default? (a) No (b) Yes
  38. 38.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing<br>Roses are red<br>Sky is blue</p>
  39. 39.🔗 Where does this link open?
    <a href="art.html">School news</a>
    (a) in the same tab (b) in a new tab
  40. 40.🔍 One closing tag is missing. Which one?
    <h2>Fun facts</h2>
    <h3>Hello, world!
    <p>Rain today</p>
    (a) </p> (b) </b> (c) </h3> (d) </h2>

Answer key

  1. element
  2. <ul>
  3. line 2
  4. False
  5. </em>
  6. on the browser tab
  7. <a>
  8. answers page requests
  9. Yes
  10. Class 7 Blog
  11. A red kite
  12. a web server
  13. opens web pages for us
  14. No
  15. False
  16. True
  17. False
  18. 1
  19. <h1>
  20. Rain today
  21. line 1
  22. an empty tag
  23. text with links
  24. 2
  25. 5
  26. 250
  27. </body>
  28. My Hobbies
  29. </h3>
  30. <br>
  31. <h2>
  32. Class 7 Blog
  33. in the body
  34. has a closing tag
  35. <h6>
  36. in the same tab
  37. Yes
  38. 4
  39. in the same tab
  40. </h3>

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