← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 411 · 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.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <ul> (c) <title> (d) <link rel="stylesheet">
  2. 2.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h6> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
  3. 3.🔠 Are headings shown in bold by default? (a) No (b) Yes
  4. 4.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h6>? (a) <h5> (b) <h3> (c) <h4> (d) <h6>
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) A tiger asleep (b) A red kite (c) tiger.jpg (d) width
  6. 6.🧱 HTML gives a web page its ___. (a) sound (b) structure (c) colours (d) speed
  7. 7.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  8. 8.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>My best friend</p>
    <h2>Hello, world!</h2>
    <p>Rain today</p>
    <h2>Good morning!</h2>
    <p>Our school trip</p>
  9. 9.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
  10. 10.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) news.html (b) art.html (c) Visit the site (d) quiz.html
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="400">
    (a) moon.png (b) Our school bus (c) width (d) The full moon
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <h3>Our school trip
    line 2: <h1>Hello, world!</h1>
    line 3: <strong>Good morning!</strong>
    (a) line 1 (b) line 3 (c) line 2
  13. 13.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) address (d) element
  14. 14.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h1>? (a) <h1> (b) <h4> (c) <h6> (d) <h3>
  15. 15.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) </head> (d) <head>
  16. 16.True or false: a web server stores a website’s files. (a) False (b) True
  17. 17.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  18. 18.📄 Can HTML on its own make tables? (a) No (b) Yes
  19. 19.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Guava</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  20. 20.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
  22. 22.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  23. 23.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Fun facts</p> -->
  24. 24.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h1> (d) <h6>
  25. 25.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
  26. 26.True or false: in <img>, src tells which image to load. (a) False (b) True
  27. 27.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>Hello, world!</h2>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>My best friend</p>
  28. 28.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
  29. 29.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>The red kite</p>
    <p>The red kite</p>
    <p>Good morning!</p>
    <h3>My pets</h3>
  30. 30.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  31. 31.True or false: <li> lists steps in order. (a) False (b) True
  32. 32.True or false: in <img>, src is read by screen readers. (a) True (b) False
  33. 33.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  34. 34.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
  35. 35.Which of these goes in the head? (a) <a> (b) <style> (c) <img> (d) <table>
  36. 36.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
  37. 37.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
  38. 38.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
  39. 39.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as a dot (c) as a new line (d) as 5 spaces
  40. 40.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) on the browser tab (d) in a big heading

Answer key

  1. <ul>
  2. <h6>
  3. Yes
  4. <h3>
  5. A tiger asleep
  6. structure
  7. has a closing tag
  8. 4
  9. an attribute
  10. art.html
  11. The full moon
  12. line 1
  13. element
  14. <h1>
  15. <!DOCTYPE html>
  16. True
  17. Yes
  18. Yes
  19. 2
  20. in the body
  21. 1
  22. in a new tab
  23. 1
  24. <h6>
  25. 6
  26. True
  27. 4
  28. <h1>
  29. 2
  30. numbers
  31. False
  32. False
  33. an empty tag
  34. href
  35. <style>
  36. 3
  37. <a>
  38. 1
  39. as one space
  40. on the browser tab

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