← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 34 · 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.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) HyperText (c) High Tech (d) Home Text
  2. 2.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
  3. 3.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) My drawings (b) Here is my best one. (c) body (d) Class 7 Blog
  4. 4.Which of these goes in the head? (a) <h1> (b) <style> (c) <ul> (d) <a>
  5. 5.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
  6. 6.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  7. 7.🔗 Where does this link open?
    <a href="contact.html">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  8. 8.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h4>? (a) <h1> (b) <h6> (c) <h5> (d) <h4>
  9. 9.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    (a) Hello, world! (b) Cricket is fun. (c) Fun facts (d) My best friend
  10. 10.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <h2>My pets</h2>
    <h2>Hello, world!</h2>
    <p>My pets</p>
    <p>Fun facts</p>
  11. 11.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to make it bigger (d) to colour it
  12. 12.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h6>? (a) <h3> (b) <h5> (c) <h6> (d) <h2>
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Stars shine<br>Kites fly high</p>
  14. 14.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  15. 15.True or false: <ol> goes inside ul or ol. (a) False (b) True
  16. 16.True or false: a code editor sends pages over the net. (a) False (b) True
  17. 17.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
  18. 18.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
  19. 19.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Line (d) Link
  20. 20.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  21. 21.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 1 (d) 3
  22. 22.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
  23. 23.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  24. 24.🔢 In a basic web page file, which comes first: “<body>” or “<html>”? (a) <body> (b) <html>
  25. 25.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    (a) Rain today (b) My pets (c) I love mangoes.
  26. 26.🔗 Which attribute holds the address of a link? (a) alt (b) href (c) src (d) id
  27. 27.True or false: <br> has a closing tag. (a) False (b) True
  28. 28.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
  29. 29.🔍 Which is the odd one out? (a) answers page requests (b) is where we type code (c) shows line numbers (d) colours code to help us
  30. 30.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    (a) Our school trip (b) My best friend (c) My pets (d) Cricket is fun.
  31. 31.🔍 One closing tag is missing. Which one?
    <h3>My pets</h3>
    <p>Good morning!</p>
    <i>Cricket is fun.
    (a) </i> (b) </h1> (c) </h3> (d) </p>
  32. 32.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
  33. 33.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as one space (d) as a new line
  34. 34.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
  35. 35.📋 What number does the browser show next to “Banana”?
    <ol start="7">
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Guava</li>
    </ol>
  36. 36.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="250">
  37. 37.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <a> (c) <table> (d) <p>
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <b>The red kite
    line 2: <h2>Cricket is fun.</h2>
    line 3: <i>I love mangoes.</i>
    (a) line 2 (b) line 1 (c) line 3
  39. 39.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow</p>
  40. 40.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
    <p>Hello, world!</p>
    (a) The red kite (b) Good morning! (c) Hello, world!

Answer key

  1. HyperText
  2. <h1>
  3. My drawings
  4. <style>
  5. <li>
  6. in the body
  7. in the same tab
  8. <h1>
  9. My best friend
  10. 4
  11. to describe the image
  12. <h2>
  13. 4
  14. in the head
  15. False
  16. False
  17. <a>
  18. 1
  19. Language
  20. 6
  21. 1
  22. <!DOCTYPE html>
  23. an empty tag
  24. <html>
  25. I love mangoes.
  26. href
  27. False
  28. <ol>
  29. answers page requests
  30. Cricket is fun.
  31. </i>
  32. starts a new line
  33. as one space
  34. 2
  35. 10
  36. 250
  37. <meta charset="utf-8">
  38. line 1
  39. 2
  40. Good morning!

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