← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 582 · 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.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Mango</li>
    </ul>
  2. 2.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  3. 3.True or false: in <img>, width sets how wide it is. (a) True (b) False
  4. 4.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
  5. 5.🔗 Which address opens when you click this link?
    <a href="games.html">About us</a>
    (a) contact.html (b) about.html (c) games.html (d) About us
  6. 6.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h4>? (a) <h4> (b) <h5> (c) <h6> (d) <h3>
  7. 7.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h6> or <h2>? (a) <h1> (b) <h4> (c) <h2> (d) <h6>
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) width (b) The full moon (c) dog.jpg (d) A happy dog
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Good morning!</p>
  10. 10.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  11. 11.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
    <p>Rain today</p>
    (a) Cricket is fun. (b) Rain today (c) The red kite (d) Our school trip
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My best friend</p> -->
  14. 14.True or false: a code editor opens web pages for us. (a) True (b) False
  15. 15.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h4> or <h1>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
  16. 16.True or false: in <img>, src tells which image to load. (a) False (b) True
  17. 17.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  18. 18.Which of these is true of a web server? (a) is where we type code (b) shows line numbers (c) stores a website’s files (d) shows pages from the web
  19. 19.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  20. 20.🔍 One closing tag is missing. Which one?
    <small>My pets</small>
    <p>Good morning!
    <h3>Our school trip</h3>
    (a) </small> (b) </p> (c) </em> (d) </h3>
  21. 21.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
  22. 22.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) alt (d) src
  23. 23.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
    (a) The red kite (b) Hello, world! (c) Cricket is fun.
  24. 24.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) My pets (b) Cricket is fun. (c) Hello, world!
  25. 25.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
  26. 26.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  27. 27.🔢 In a basic web page file, which comes LAST? (a) </body> (b) <!DOCTYPE html> (c) <head> (d) </html>
  28. 28.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h1> (d) <h5>
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <p>My pets</p>
  30. 30.🔤 In “HTML”, what does the L stand for? (a) Language (b) Laptop (c) Line (d) Link
  31. 31.🔍 One closing tag is missing. Which one?
    <small>Hello, world!</small>
    <h1>Our school trip
    <p>Good morning!</p>
    (a) </h1> (b) </p> (c) </small> (d) </strong>
  32. 32.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) address (d) editor
  33. 33.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) A tiger asleep (b) fort.jpg (c) width (d) An old fort
  35. 35.🖼️ 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
  36. 36.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <strong>Rain today
    <em>The red kite</em>
    (a) </b> (b) </strong> (c) </h2> (d) </em>
  37. 37.True or false: <img> goes in the body. (a) True (b) False
  38. 38.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
  39. 39.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  40. 40.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>

Answer key

  1. 2
  2. True
  3. True
  4. <a>
  5. games.html
  6. <h3>
  7. <h6>
  8. A happy dog
  9. 1
  10. has a closing tag
  11. Our school trip
  12. 2
  13. 2
  14. False
  15. <h5>
  16. True
  17. an opening tag
  18. stores a website’s files
  19. an empty tag
  20. </p>
  21. a paragraph
  22. width
  23. Hello, world!
  24. Cricket is fun.
  25. <img>
  26. in the body
  27. </html>
  28. <h6>
  29. 2
  30. Language
  31. </h1>
  32. element
  33. 6
  34. An old fort
  35. to describe the image
  36. </strong>
  37. True
  38. <ul>
  39. No
  40. 2

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