← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 476 · 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.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  2. 2.True or false: in <img>, alt names the picture file. (a) False (b) True
  3. 3.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) href (b) Play games (c) Take the quiz (d) maths.html
  4. 4.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    (a) Good morning! (b) My pets (c) Cricket is fun.
  5. 5.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
  6. 6.🔗 Which words do you click on?
    <a href="news.html">About us</a>
    (a) news.html (b) Contact us (c) href (d) About us
  7. 7.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  8. 8.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="150">
    (a) tiger.jpg (b) fort.jpg (c) An old fort (d) kite.png
  9. 9.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
  10. 10.🔗 Where does this link open?
    <a href="about.html">About us</a>
    (a) in the same tab (b) in a new tab
  11. 11.📄 Can HTML on its own pick a random number? (a) Yes (b) No
  12. 12.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h3>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
  13. 13.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  14. 14.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <body> (d) <head>
  15. 15.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  16. 16.💬 Does the browser show comments on the page? (a) Yes (b) No
  17. 17.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  18. 18.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>I love mangoes.</p>
    <h3>Cricket is fun.</h3>
    <h4>Rain today</h4>
  19. 19.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) height (d) src
  20. 20.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  21. 21.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  22. 22.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ul>
  23. 23.True or false: <ul> lists things in any order. (a) True (b) False
  24. 24.📝 What does <br> do? (a) makes a list (b) makes text bold (c) starts a new line (d) adds a picture
  25. 25.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h4> or <h1>? (a) <h1> (b) <h2> (c) <h4> (d) <h3>
  26. 26.Which of these goes in the body? (a) <ul> (b) <title> (c) <style> (d) <link rel="stylesheet">
  27. 27.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <p>Rain today</p>
    (a) Rain today (b) I love mangoes. (c) My pets (d) My best friend
  28. 28.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
  29. 29.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
  30. 30.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <html> (c) <!DOCTYPE html> (d) <head>
  31. 31.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to colour it (d) to make it bigger
  32. 32.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
  33. 33.📝 What do we need to write HTML? (a) a microphone (b) a plain text editor (c) a paintbrush (d) a printer
  34. 34.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>I love mangoes.</p> -->
  35. 35.Which of these is an opening tag? (a) </title> (b) </p> (c) <body> (d) </h1>
  36. 36.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
  38. 38.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h2> or <h5>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
  39. 39.🔗 Which address opens when you click this link?
    <a href="https://example.com">School news</a>
    (a) School news (b) maths.html (c) https://example.com (d) art.html
  40. 40.🔍 Which line is missing its closing tag?
    line 1: <i>I love mangoes.
    line 2: <b>My pets</b>
    line 3: <h2>The red kite</h2>
    (a) line 1 (b) line 3 (c) line 2

Answer key

  1. <ol>
  2. False
  3. Take the quiz
  4. My pets
  5. <!--
  6. About us
  7. a closing tag
  8. fort.jpg
  9. -->
  10. in the same tab
  11. No
  12. <h1>
  13. an opening tag
  14. <!DOCTYPE html>
  15. in the body
  16. No
  17. in the head
  18. 3
  19. src
  20. Yes
  21. numbers
  22. 6
  23. True
  24. starts a new line
  25. <h4>
  26. <ul>
  27. My best friend
  28. <li>
  29. a code editor
  30. <!DOCTYPE html>
  31. to describe the image
  32. on the browser tab
  33. a plain text editor
  34. 1
  35. <body>
  36. width
  37. 3
  38. <h5>
  39. https://example.com
  40. line 1

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