← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 70 · 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.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
  2. 2.True or false: in <img>, width describes the picture. (a) True (b) False
  3. 3.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Rain today</p>
    <p>The red kite</p>
    <p>The red kite</p>
    <p>The red kite</p>
  4. 4.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h1> (d) <h3>
  5. 5.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
  6. 6.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Roses are red</p>
  8. 8.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Jamun</li>
    </ol>
  9. 9.True or false: <ul> is an ordered list. (a) False (b) True
  10. 10.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
  11. 11.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) width (c) src (d) height
  12. 12.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
  13. 13.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h3> or <h5>? (a) <h5> (b) <h3> (c) <h4> (d) <h6>
  14. 14.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    (a) Cricket is fun. (b) My best friend (c) The red kite
  15. 15.🔗 Where does this link open?
    <a href="maths.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  16. 16.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) alt (d) width
  17. 17.Which of these goes in the head? (a) <a> (b) <h1> (c) <img> (d) <title>
  18. 18.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Hello, world!</p>
  19. 19.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 10 (d) 3
  20. 20.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="150">
  21. 21.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h2>Good morning!</h2>
    <p>Fun facts</p>
    <p>Our school trip</p>
  22. 22.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Good morning!</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <p>The red kite</p>
  23. 23.Which of these has a closing tag? (a) <input> (b) <ul> (c) <img> (d) <meta>
  24. 24.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Match report (b) Class 7 Blog (c) I like to read. (d) body
  25. 25.Which of these goes in the head? (a) <a> (b) <meta charset="utf-8"> (c) <h1> (d) <table>
  26. 26.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    (a) The red kite (b) Hello, world! (c) Fun facts
  27. 27.🔍 One closing tag is missing. Which one?
    <small>Good morning!
    <h2>My pets</h2>
    <u>I love mangoes.</u>
    (a) </u> (b) </i> (c) </h2> (d) </small>
  28. 28.True or false: in <img>, alt tells which image to load. (a) False (b) True
  29. 29.🔠 Are headings shown in bold by default? (a) No (b) Yes
  30. 30.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <table> (c) <p> (d) <h1>
  31. 31.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.</h1>
    <h3>Hello, world!
    <h2>Good morning!</h2>
    (a) </h1> (b) </h2> (c) </small> (d) </h3>
  32. 32.🔢 In a basic web page file, which comes LAST? (a) <head> (b) </html> (c) </head> (d) <!DOCTYPE html>
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
  34. 34.Which of these is a closing tag? (a) <body> (b) <li> (c) <p> (d) </p>
  35. 35.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h4>? (a) <h2> (b) <h4> (c) <h6> (d) <h1>
  36. 36.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  37. 37.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
    (a) map.png (b) A tiger asleep (c) kite.png (d) tiger.jpg
  38. 38.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  39. 39.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
  40. 40.📋 What number does the browser show next to “Banana”?
    <ol start="8">
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>

Answer key

  1. to leave notes
  2. False
  3. 5
  4. <h6>
  5. <!--
  6. Yes
  7. 3
  8. 4
  9. False
  10. <ol>
  11. alt
  12. 3
  13. <h3>
  14. The red kite
  15. in a new tab
  16. src
  17. <title>
  18. 1
  19. 1
  20. 150
  21. 2
  22. 1
  23. <ul>
  24. Match report
  25. <meta charset="utf-8">
  26. The red kite
  27. </small>
  28. False
  29. Yes
  30. <link rel="stylesheet">
  31. </h3>
  32. </html>
  33. 1
  34. </p>
  35. <h6>
  36. has a closing tag
  37. tiger.jpg
  38. No
  39. 2
  40. 11

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