← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 310 · 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.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ul>
  2. 2.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) games.html (b) Visit the site (c) href (d) Maths fun
  3. 3.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
    (a) Cricket is fun. (b) I love mangoes. (c) My pets
  4. 4.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  5. 5.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  6. 6.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  7. 7.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
  8. 8.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="200">
    (a) bus.jpg (b) dog.jpg (c) A happy dog (d) moon.png
  9. 9.🏷️ Which is the closing tag for <small>? (a) <small/> (b) <\small> (c) </small> (d) <small>
  10. 10.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h3>? (a) <h6> (b) <h2> (c) <h3> (d) <h1>
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue</p>
  12. 12.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
  13. 13.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  14. 14.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  15. 15.True or false: in <img>, alt is read by screen readers. (a) False (b) True
  16. 16.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <h2>Good morning!</h2>
    <p>Fun facts</p>
  17. 17.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h6> or <h4>? (a) <h4> (b) <h3> (c) <h6> (d) <h5>
  18. 18.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
  19. 19.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h2>? (a) <h2> (b) <h5> (c) <h3> (d) <h1>
  20. 20.💬 How does an HTML comment end? (a) --> (b) // (c) >> (d) */
  21. 21.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
  22. 22.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
  23. 23.🔗 Where does this link open?
    <a href="news.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  24. 24.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  25. 25.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="400">
  26. 26.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="200">
    (a) cake.jpg (b) A red kite (c) map.png (d) kite.png
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <b>My best friend
    line 2: <em>My pets</em>
    line 3: <strong>Cricket is fun.</strong>
    (a) line 3 (b) line 2 (c) line 1
  28. 28.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>My pets</h2>
    <h2>My best friend</h2>
    <p>My best friend</p>
  29. 29.True or false: <table> goes in the head. (a) True (b) False
  30. 30.Which of these goes in the head? (a) <style> (b) <table> (c) <img> (d) <a>
  31. 31.🔗 Where does this link open?
    <a href="art.html">About us</a>
    (a) in a new tab (b) in the same tab
  32. 32.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
  33. 33.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
  34. 34.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Markup (c) Mouse (d) Machine
  35. 35.True or false: HTML on its own can show paragraphs. (a) False (b) True
  36. 36.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>Rain today</h4>
    <h2>The red kite</h2>
  37. 37.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  38. 38.📋 What number does the browser show next to “Jamun”?
    <ol start="7">
      <li>Litchi</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
  39. 39.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
  40. 40.Which of these has a closing tag? (a) <meta> (b) <h1> (c) <br> (d) <input>

Answer key

  1. 4
  2. Visit the site
  3. I love mangoes.
  4. 1
  5. an opening tag
  6. a closing tag
  7. a web browser
  8. dog.jpg
  9. </small>
  10. <h1>
  11. 2
  12. <
  13. an empty tag
  14. 3
  15. True
  16. 3
  17. <h6>
  18. <a>
  19. <h1>
  20. -->
  21. <a href="about.html">
  22. to leave notes
  23. in the same tab
  24. Yes
  25. 400
  26. kite.png
  27. line 1
  28. 3
  29. False
  30. <style>
  31. in the same tab
  32. 3
  33. 2
  34. Markup
  35. True
  36. 3
  37. has a closing tag
  38. 9
  39. opens it in a new tab
  40. <h1>

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