← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 416 · 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.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  2. 2.🏷️ Which is the closing tag for <small>? (a) <small> (b) <\small> (c) <small/> (d) </small>
  3. 3.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  4. 4.💬 How does an HTML comment end? (a) >> (b) */ (c) // (d) -->
  5. 5.📄 Can HTML on its own make tables? (a) No (b) Yes
  6. 6.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!
    line 2: <strong>Cricket is fun.</strong>
    line 3: <h3>The red kite</h3>
    (a) line 1 (b) line 2 (c) line 3
  7. 7.🌍 Which program shows a web page to us? (a) a paint program (b) a web browser (c) a music player (d) a calculator
  8. 8.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <br> (d) <p>
  9. 9.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  10. 10.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  11. 11.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
  12. 12.Which of these has a closing tag? (a) <img> (b) <input> (c) <br> (d) <b>
  13. 13.🔍 One closing tag is missing. Which one?
    <p>Hello, world!</p>
    <h1>Our school trip
    <h3>I love mangoes.</h3>
    (a) </h3> (b) </p> (c) </h1> (d) </b>
  14. 14.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) contact.html (b) maths.html (c) https://example.com (d) Maths fun
  15. 15.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ul>
  16. 16.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h6> or <h1>? (a) <h6> (b) <h2> (c) <h5> (d) <h1>
  17. 17.True or false: in <img>, src is read by screen readers. (a) False (b) True
  18. 18.🔍 One closing tag is missing. Which one?
    <b>Hello, world!</b>
    <strong>The red kite</strong>
    <h1>Fun facts
    (a) </strong> (b) </h1> (c) </b> (d) </h3>
  19. 19.True or false: <ol> lists steps in order. (a) True (b) False
  20. 20.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) href (b) games.html (c) Take the quiz (d) School news
  21. 21.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  22. 22.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) index.html (c) My drawings (d) Riya’s Recipes
  23. 23.True or false: <hr> has a closing tag. (a) True (b) False
  24. 24.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  25. 25.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  26. 26.🔍 One closing tag is missing. Which one?
    <em>Cricket is fun.</em>
    <b>The red kite
    <strong>My best friend</strong>
    (a) </p> (b) </em> (c) </strong> (d) </b>
  27. 27.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>My pets</h2>
    <p>Rain today</p>
  28. 28.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Art Gallery (b) I like to read. (c) My drawings (d) body
  29. 29.🔗 Where does this link open?
    <a href="about.html">School news</a>
    (a) in the same tab (b) in a new tab
  30. 30.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) src (c) height (d) alt
  31. 31.🧱 HTML gives a web page its ___. (a) colours (b) speed (c) structure (d) sound
  32. 32.🌐 Which one shows line numbers? (a) a web browser (b) a web server (c) a code editor
  33. 33.True or false: in <img>, height tells which image to load. (a) True (b) False
  34. 34.🔍 Which line is missing its closing tag?
    line 1: <b>I love mangoes.</b>
    line 2: <small>The red kite</small>
    line 3: <h2>Good morning!
    (a) line 2 (b) line 3 (c) line 1
  35. 35.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h5>? (a) <h5> (b) <h6> (c) <h1> (d) <h2>
  36. 36.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  37. 37.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  38. 38.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a dot (d) as a new line
  39. 39.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
  40. 40.💬 Does the browser show comments on the page? (a) No (b) Yes

Answer key

  1. in a new tab
  2. </small>
  3. 2
  4. -->
  5. Yes
  6. line 1
  7. a web browser
  8. <h1>
  9. in a new tab
  10. an opening tag
  11. True
  12. <b>
  13. </h1>
  14. contact.html
  15. 3
  16. <h6>
  17. False
  18. </h1>
  19. True
  20. School news
  21. href
  22. Riya’s Recipes
  23. False
  24. an opening tag
  25. 6
  26. </b>
  27. 2
  28. My drawings
  29. in the same tab
  30. height
  31. structure
  32. a code editor
  33. False
  34. line 3
  35. <h6>
  36. has a closing tag
  37. No
  38. as one space
  39. the body
  40. No

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