← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 413 · 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.🔠 Are headings shown in bold by default? (a) Yes (b) No
  2. 2.True or false: <style> goes in the body. (a) False (b) True
  3. 3.📛 In <a href="x.html">, what is href? (a) an attribute (b) an element name (c) a comment (d) a closing tag
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <strong>Good morning!
    line 2: <h1>Our school trip</h1>
    line 3: <em>Cricket is fun.</em>
    (a) line 3 (b) line 1 (c) line 2
  5. 5.Which of these has a closing tag? (a) <p> (b) <img> (c) <br> (d) <hr>
  6. 6.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) height (d) src
  7. 7.True or false: <li> has a closing tag. (a) True (b) False
  8. 8.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h6>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  9. 9.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  10. 10.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Rain today</p>
    <p>Our school trip</p>
    <p>Good morning!</p>
  11. 11.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
  12. 12.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h5>? (a) <h5> (b) <h1> (c) <h4> (d) <h2>
  13. 13.📄 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>Thanks for visiting.</p>
    </body>
    </html>
    (a) My drawings (b) body (c) Class 7 Blog (d) Thanks for visiting.
  14. 14.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>I love mangoes.</h2>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <h2>Rain today</h2>
  15. 15.True or false: <input> is an empty tag. (a) True (b) False
  16. 16.True or false: in <img>, src tells which image to load. (a) True (b) False
  17. 17.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  18. 18.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
  19. 19.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) Welcome! (c) Mars is red. (d) index.html
  20. 20.Which of these is a closing tag? (a) <h1> (b) <b> (c) </b> (d) <li>
  21. 21.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>The red kite</p>
    <h4>Fun facts</h4>
  22. 22.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
  23. 23.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
  24. 24.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h3> (b) <h2> (c) <h6> (d) <h1>
  25. 25.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <h1> (d) <link rel="stylesheet">
  26. 26.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 6 (d) 10
  27. 27.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
  28. 28.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h4>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
  29. 29.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) { (d) (
  30. 30.🏷️ Which is the closing tag for <i>? (a) <i/> (b) </i> (c) <i> (d) <\i>
  31. 31.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <li> (c) <ul>
  32. 32.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  33. 33.Which of these goes in the head? (a) <ul> (b) <a> (c) <style> (d) <p>
  34. 34.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  35. 35.True or false: HTML on its own can make a form. (a) True (b) False
  36. 36.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  37. 37.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h5>? (a) <h5> (b) <h2> (c) <h6> (d) <h3>
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="350">
    (a) map.png (b) Map of India (c) width (d) Birthday cake
  39. 39.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow</p>
  40. 40.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab

Answer key

  1. Yes
  2. False
  3. an attribute
  4. line 1
  5. <p>
  6. height
  7. True
  8. <h1>
  9. <ol>
  10. 4
  11. a web server
  12. <h5>
  13. My drawings
  14. 3
  15. True
  16. True
  17. Yes
  18. 4
  19. Riya’s Recipes
  20. </b>
  21. 2
  22. 6
  23. -->
  24. <h1>
  25. <h1>
  26. 6
  27. opens it in a new tab
  28. <h1>
  29. <
  30. </i>
  31. <li>
  32. has a closing tag
  33. <style>
  34. numbers
  35. True
  36. <ol>
  37. <h2>
  38. Map of India
  39. 2
  40. on the browser tab

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