← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 156 · 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.True or false: <h1> has a closing tag. (a) True (b) False
  2. 2.True or false: in <img>, height describes the picture. (a) True (b) False
  3. 3.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) My drawings (c) body (d) Space Facts
  4. 4.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a closing tag (d) a comment
  5. 5.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h3>? (a) <h3> (b) <h4> (c) <h1> (d) <h6>
  6. 6.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) src (d) width
  7. 7.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) shows line numbers (d) stores a website’s files
  8. 8.🔍 One closing tag is missing. Which one?
    <strong>Good morning!</strong>
    <i>My best friend</i>
    <b>The red kite
    (a) </strong> (b) </i> (c) </em> (d) </b>
  9. 9.🔗 Which address opens when you click this link?
    <a href="contact.html">Visit the site</a>
    (a) maths.html (b) Visit the site (c) contact.html (d) https://example.com
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow</p>
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Rivers flow<br>Roses are red<br>Kites fly high</p>
  12. 12.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow<br>Kites fly high</p>
  13. 13.Which of these is an opening tag? (a) </li> (b) </p> (c) </title> (d) <h1>
  14. 14.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>Good morning!</h2>
    <p>I love mangoes.</p>
    <p>Rain today</p>
  15. 15.🔗 Which address opens when you click this link?
    <a href="games.html">Art corner</a>
    (a) contact.html (b) about.html (c) games.html (d) Art corner
  16. 16.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Good morning!</p>
    <p>My pets</p>
  17. 17.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
  18. 18.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
  19. 19.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <link about.html>
  20. 20.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1/> (c) <\h1> (d) <h1>
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
  22. 22.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) ( (d) <
  23. 23.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <ul> (d) <meta charset="utf-8">
  25. 25.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h5> or <h1>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
  26. 26.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) src (d) alt
  27. 27.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) bus.jpg (b) dog.jpg (c) A happy dog (d) moon.png
  28. 28.True or false: HTML on its own can make a form. (a) True (b) False
  29. 29.📋 What number does the browser show next to “Papaya”?
    <ol start="5">
      <li>Guava</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Litchi</li>
    </ol>
  30. 30.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <a> (d) <pic>
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine<br>Roses are red</p>
  32. 32.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
  33. 33.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Fun facts</p> -->
    <!-- <p>Cricket is fun.</p> -->
  34. 34.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    (a) My pets (b) The red kite (c) Our school trip
  35. 35.True or false: <li> goes inside ul or ol. (a) True (b) False
  36. 36.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>Fun facts</h2>
    <h2>Hello, world!</h2>
    <h2>Good morning!</h2>
  37. 37.True or false: <b> has a closing tag. (a) False (b) True
  38. 38.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h6> or <h1>? (a) <h6> (b) <h4> (c) <h1> (d) <h3>
  39. 39.🔗 Which words do you click on?
    <a href="art.html">Art corner</a>
    (a) Art corner (b) href (c) School news (d) art.html
  40. 40.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h2>? (a) <h3> (b) <h4> (c) <h2> (d) <h6>

Answer key

  1. True
  2. False
  3. My drawings
  4. an attribute
  5. <h1>
  6. alt
  7. shows line numbers
  8. </b>
  9. contact.html
  10. 2
  11. 5
  12. 3
  13. <h1>
  14. 3
  15. games.html
  16. 2
  17. <!--
  18. 2
  19. <a href="about.html">
  20. </h1>
  21. 1
  22. <
  23. an opening tag
  24. <ul>
  25. <h1>
  26. alt
  27. dog.jpg
  28. True
  29. 8
  30. <img>
  31. 3
  32. <!DOCTYPE html>
  33. 1
  34. Our school trip
  35. True
  36. 1
  37. True
  38. <h6>
  39. Art corner
  40. <h6>

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