← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 30 · 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 HTML on its own make headings? (a) Yes (b) No
  2. 2.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) maths.html (b) Contact us (c) contact.html (d) https://example.com
  3. 3.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h6>? (a) <h1> (b) <h6> (c) <h5> (d) <h4>
  4. 4.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <head> (b) <!DOCTYPE html>
  5. 5.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) tiger.jpg (b) A tiger asleep (c) width (d) A red kite
  7. 7.Which of these is an opening tag? (a) </body> (b) <li> (c) </p> (d) </li>
  8. 8.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <img> (d) <style>
  9. 9.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  10. 10.📋 Which tag goes around each item of a list? (a) <li> (b) <ul> (c) <p> (d) <ol>
  11. 11.True or false: <li> is an unordered list. (a) False (b) True
  12. 12.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
  13. 13.True or false: a web browser shows pages from the web. (a) True (b) False
  14. 14.📋 What number does the browser show next to “Guava”?
    <ol start="4">
      <li>Banana</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Jamun</li>
    </ol>
  15. 15.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
  16. 16.💬 How does an HTML comment start? (a) <!-- (b) // (c) /* (d) #
  17. 17.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  18. 18.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  19. 19.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  20. 20.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) about.html (b) Contact us (c) About us (d) href
  21. 21.Which of these is an opening tag? (a) </li> (b) </title> (c) </b> (d) <b>
  22. 22.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) bus.jpg (b) dog.jpg (c) A happy dog (d) moon.png
  23. 23.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) kite.png (b) tiger.jpg (c) A tiger asleep (d) map.png
  24. 24.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
  25. 25.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) School news (b) Art corner (c) https://example.com (d) href
  26. 26.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  27. 27.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  28. 28.Which of these goes in the body? (a) <p> (b) <style> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
  29. 29.📋 Which list tag is one item of a list? (a) <li> (b) <ol> (c) <ul>
  30. 30.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
  31. 31.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Space Facts (b) I like to read. (c) index.html (d) My drawings
  32. 32.True or false: <ol> is an ordered list. (a) True (b) False
  33. 33.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
  34. 34.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Our school trip</p>
    <p>Fun facts</p>
    <h4>Our school trip</h4>
  35. 35.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
  36. 36.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Hello, world!</p>
    <p>Our school trip</p>
  37. 37.True or false: <li> shows bullet points. (a) False (b) True
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) cake.jpg (b) Birthday cake (c) width (d) A happy dog
  39. 39.🔍 Which line is missing its closing tag?
    line 1: <em>The red kite</em>
    line 2: <small>Rain today
    line 3: <i>Good morning!</i>
    (a) line 1 (b) line 2 (c) line 3
  40. 40.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) alt (c) height (d) src

Answer key

  1. Yes
  2. contact.html
  3. <h1>
  4. <!DOCTYPE html>
  5. 2
  6. A tiger asleep
  7. <li>
  8. <img>
  9. in the head
  10. <li>
  11. False
  12. 2
  13. True
  14. 5
  15. Markup
  16. <!--
  17. 4
  18. an empty tag
  19. in the head
  20. About us
  21. <b>
  22. dog.jpg
  23. tiger.jpg
  24. <ol>
  25. Art corner
  26. in the head
  27. an empty tag
  28. <p>
  29. <li>
  30. <img>
  31. Space Facts
  32. True
  33. <ol>
  34. 2
  35. href
  36. 1
  37. False
  38. Birthday cake
  39. line 2
  40. alt

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