← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 791 · 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.📝 What does <br> do? (a) makes a list (b) starts a new line (c) makes text bold (d) adds a picture
  2. 2.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="100">
  3. 3.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) Visit the site (b) games.html (c) href (d) Maths fun
  4. 4.Which of these goes in the body? (a) <title> (b) <style> (c) <a> (d) <meta charset="utf-8">
  5. 5.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
  6. 6.🔍 One closing tag is missing. Which one?
    <h1>My pets
    <em>The red kite</em>
    <h2>Hello, world!</h2>
    (a) </h2> (b) </u> (c) </em> (d) </h1>
  7. 7.📝 What does <p> make? (a) a link (b) a table (c) a picture (d) a paragraph
  8. 8.🔗 Which address opens when you click this link?
    <a href="games.html">Visit the site</a>
    (a) contact.html (b) about.html (c) Visit the site (d) games.html
  9. 9.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep
  10. 10.📋 What number does the browser show next to “Orange”?
    <ol start="5">
      <li>Guava</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
  11. 11.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  12. 12.True or false: in <img>, height is read by screen readers. (a) False (b) True
  13. 13.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>Cricket is fun.</h4>
    <h4>Cricket is fun.</h4>
    <p>Rain today</p>
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Stars shine</p>
  15. 15.🌐 Which one shows line numbers? (a) a web server (b) a code editor (c) a web browser
  16. 16.True or false: <p> is an empty tag. (a) True (b) False
  17. 17.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Grapes</li>
    </ul>
    (a) bullets (b) numbers
  18. 18.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <p> (d) <h6>
  19. 19.Which of these goes in the head? (a) <ul> (b) <a> (c) <link rel="stylesheet"> (d) <h1>
  20. 20.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>My pets</h4>
    <h4>I love mangoes.</h4>
  21. 21.🔗 Which address opens when you click this link?
    <a href="quiz.html">Maths fun</a>
    (a) games.html (b) about.html (c) quiz.html (d) Maths fun
  22. 22.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ul>
  23. 23.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  24. 24.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Our school trip (c) Fun facts
  25. 25.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
  26. 26.🔍 Which line is missing its closing tag?
    line 1: <small>Hello, world!
    line 2: <h1>I love mangoes.</h1>
    line 3: <em>Cricket is fun.</em>
    (a) line 2 (b) line 1 (c) line 3
  27. 27.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    <p>The red kite</p>
  29. 29.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <h2>I love mangoes.</h2>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
  30. 30.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
    (a) numbers (b) bullets
  31. 31.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <p>My pets</p>
    <p>Rain today</p>
    (a) My best friend (b) Rain today (c) Cricket is fun. (d) My pets
  32. 32.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) Planets (c) body (d) Art Gallery
  33. 33.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
  34. 34.True or false: in <img>, width tells which image to load. (a) True (b) False
  35. 35.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  36. 36.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  37. 37.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
  38. 38.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
  39. 39.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to load it faster (d) to colour it
  40. 40.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <

Answer key

  1. starts a new line
  2. 100
  3. Visit the site
  4. <a>
  5. True
  6. </h1>
  7. a paragraph
  8. games.html
  9. A tiger asleep
  10. 6
  11. an opening tag
  12. False
  13. 3
  14. 2
  15. a code editor
  16. False
  17. bullets
  18. <h6>
  19. <link rel="stylesheet">
  20. 3
  21. quiz.html
  22. 6
  23. in the body
  24. Our school trip
  25. <ol>
  26. line 1
  27. an opening tag
  28. 2
  29. 5
  30. numbers
  31. Cricket is fun.
  32. Planets
  33. alt
  34. False
  35. a closing tag
  36. <ol>
  37. <ol>
  38. <img>
  39. to describe the image
  40. <

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