← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 160 · 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.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  2. 2.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Jamun</li>
    </ul>
  3. 3.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Riya’s Recipes (c) body (d) All about me
  4. 4.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  5. 5.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  6. 6.🔗 Which words do you click on?
    <a href="news.html">Art corner</a>
    (a) School news (b) href (c) news.html (d) Art corner
  7. 7.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
  8. 8.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My pets</p>
    <p>Good morning!</p>
    <p>My pets</p>
  9. 9.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ol>
  10. 10.Which of these goes in the head? (a) <img> (b) <a> (c) <title> (d) <table>
  11. 11.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Cricket is fun.</h2>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>Our school trip</p>
  12. 12.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    (a) Rain today (b) I love mangoes. (c) My pets
  13. 13.🌐 Which one saves our .html files? (a) a code editor (b) a web browser (c) a web server
  14. 14.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Birds sing</p>
  16. 16.💬 How does an HTML comment end? (a) --> (b) // (c) */ (d) >>
  17. 17.True or false: a web browser sends pages over the net. (a) False (b) True
  18. 18.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) sends pages over the net (d) saves our .html files
  19. 19.📋 What number does the browser show next to “Guava”?
    <ol start="5">
      <li>Litchi</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
  20. 20.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>The red kite</p>
    (a) Rain today (b) The red kite (c) Hello, world! (d) Our school trip
  21. 21.🖼️ Which attribute of <img> describes the picture? (a) width (b) height (c) alt (d) src
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <i>Fun facts</i>
    line 2: <h2>The red kite</h2>
    line 3: <h3>Our school trip
    (a) line 2 (b) line 3 (c) line 1
  23. 23.🔍 Which line is missing its closing tag?
    line 1: <h2>Good morning!</h2>
    line 2: <i>Hello, world!</i>
    line 3: <h1>Rain today
    (a) line 1 (b) line 2 (c) line 3
  24. 24.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) My drawings (b) We won by 5 runs. (c) body (d) Art Gallery
  25. 25.Which of these goes in the body? (a) <table> (b) <meta charset="utf-8"> (c) <title> (d) <style>
  26. 26.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  27. 27.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  28. 28.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
  29. 29.True or false: <li> lists things in any order. (a) False (b) True
  30. 30.Which of these is a closing tag? (a) <p> (b) <body> (c) <h1> (d) </p>
  31. 31.🔗 Where does this link open?
    <a href="about.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  32. 32.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>My pets</h2>
    <p>My best friend</p>
    <p>My pets</p>
    <h2>Our school trip</h2>
    <p>My pets</p>
  33. 33.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
  34. 34.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
  35. 35.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red</p>
  36. 36.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  37. 37.True or false: <img> is an empty tag. (a) True (b) False
  38. 38.🔗 Where does this link open?
    <a href="games.html" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  39. 39.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h2> or <h4>? (a) <h5> (b) <h2> (c) <h4> (d) <h3>
  40. 40.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    <p>My pets</p>
    <p>The red kite</p>

Answer key

  1. Yes
  2. 4
  3. All about me
  4. <ul>
  5. Yes
  6. Art corner
  7. to describe the image
  8. 1
  9. 2
  10. <title>
  11. 4
  12. My pets
  13. a code editor
  14. 2
  15. 2
  16. -->
  17. False
  18. sends pages over the net
  19. 6
  20. Hello, world!
  21. alt
  22. line 3
  23. line 3
  24. My drawings
  25. <table>
  26. No
  27. No
  28. a web server
  29. False
  30. </p>
  31. in the same tab
  32. 4
  33. 1
  34. href
  35. 2
  36. Yes
  37. True
  38. in a new tab
  39. <h2>
  40. 4

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