← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 770 · 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.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  2. 2.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  3. 3.True or false: a web server opens web pages for us. (a) False (b) True
  4. 4.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) alt (d) width
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <em>Cricket is fun.</em>
    line 2: <small>Rain today
    line 3: <i>My best friend</i>
    (a) line 1 (b) line 3 (c) line 2
  6. 6.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h3>? (a) <h1> (b) <h6> (c) <h4> (d) <h3>
  7. 7.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
  8. 8.True or false: <img> goes in the body. (a) False (b) True
  9. 9.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
  10. 10.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  11. 11.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  12. 12.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a src="about.html">
  13. 13.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
  14. 14.True or false: <ol> goes inside ul or ol. (a) False (b) True
  15. 15.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  16. 16.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
  17. 17.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  18. 18.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Our school trip</p>
    <p>My best friend</p>
    <h2>My best friend</h2>
    <h2>My pets</h2>
    <p>Rain today</p>
  19. 19.Which of these goes in the head? (a) <style> (b) <p> (c) <table> (d) <img>
  20. 20.True or false: <table> goes in the head. (a) True (b) False
  21. 21.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
  22. 22.Which of these is a closing tag? (a) <body> (b) </h1> (c) <b> (d) <title>
  23. 23.🌐 Which one answers page requests? (a) a web server (b) a web browser (c) a code editor
  24. 24.🔍 One closing tag is missing. Which one?
    <p>I love mangoes.
    <h1>My pets</h1>
    <b>Hello, world!</b>
    (a) </p> (b) </b> (c) </h1> (d) </u>
  25. 25.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) games.html (b) About us (c) Play games (d) href
  26. 26.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Match report (b) index.html (c) I like to read. (d) Art Gallery
  27. 27.True or false: a web server hosts websites online. (a) False (b) True
  28. 28.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ul>
  29. 29.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>My pets</p>
    <h2>Cricket is fun.</h2>
    <h2>Rain today</h2>
    <p>I love mangoes.</p>
  30. 30.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
  31. 31.🔗 Where does this link open?
    <a href="games.html">Play games</a>
    (a) in a new tab (b) in the same tab
  32. 32.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  33. 33.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  34. 34.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <\p> (c) </p> (d) <p>
  35. 35.Which of these has a closing tag? (a) <img> (b) <meta> (c) <title> (d) <input>
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>My best friend</p> -->
  37. 37.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h1>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
  38. 38.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  39. 39.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>I love mangoes.</h3>
    <p>Hello, world!</p>
    <p>The red kite</p>
    <p>I love mangoes.</p>
  40. 40.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>

Answer key

  1. an empty tag
  2. a closing tag
  3. False
  4. src
  5. line 2
  6. <h1>
  7. 5
  8. True
  9. a line across the page
  10. has a closing tag
  11. 2
  12. <a href="about.html">
  13. a slash /
  14. False
  15. numbers
  16. <!--
  17. a closing tag
  18. 4
  19. <style>
  20. False
  21. the body
  22. </h1>
  23. a web server
  24. </p>
  25. Play games
  26. Art Gallery
  27. True
  28. 5
  29. 3
  30. <h6>
  31. in the same tab
  32. <ul>
  33. False
  34. </p>
  35. <title>
  36. 1
  37. <h1>
  38. a web browser
  39. 2
  40. </h2>

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