← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 905 · 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.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Roses are red<br>Rivers flow<br>Stars shine</p>
  2. 2.📝 What does <br> do? (a) makes a list (b) makes text bold (c) starts a new line (d) adds a picture
  3. 3.🔗 Which words do you click on?
    <a href="games.html">Maths fun</a>
    (a) href (b) Art corner (c) games.html (d) Maths fun
  4. 4.📋 What number does the browser show next to “Papaya”?
    <ol start="9">
      <li>Mango</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ol>
  5. 5.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  6. 6.True or false: HTML on its own can make links to pages. (a) False (b) True
  7. 7.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
  8. 8.🏷️ Which is the closing tag for <b>? (a) <b/> (b) <\b> (c) </b> (d) <b>
  9. 9.Which of these is an empty tag? (a) <p> (b) <ul> (c) <h1> (d) <img>
  10. 10.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    <p>Hello, world!</p>
  12. 12.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <h1>Good morning!</h1>
    <small>Fun facts
    (a) </h1> (b) </h2> (c) </small> (d) </h3>
  13. 13.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  14. 14.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>My pets</p> -->
  15. 15.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  16. 16.True or false: <input> is an empty tag. (a) True (b) False
  17. 17.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) width (b) cake.jpg (c) Birthday cake (d) A happy dog
  19. 19.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  20. 20.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  21. 21.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h1> (c) <br> (d) <h6>
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
  23. 23.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.🔗 Which words do you click on?
    <a href="maths.html">Play games</a>
    (a) maths.html (b) Play games (c) About us (d) href
  25. 25.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  26. 26.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) is where we type code (d) turns HTML into a page
  27. 27.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) src (c) height (d) width
  28. 28.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) opens it in a new tab (d) makes it blank
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="350">
    (a) Our school bus (b) moon.png (c) The full moon (d) width
  30. 30.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  31. 31.True or false: <title> goes in the head. (a) False (b) True
  32. 32.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h2> or <h3>? (a) <h4> (b) <h2> (c) <h5> (d) <h3>
  33. 33.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  34. 34.Which of these is an opening tag? (a) <title> (b) </title> (c) </p> (d) </li>
  35. 35.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
  36. 36.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  37. 37.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt
  38. 38.🔗 Where does this link open?
    <a href="about.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  39. 39.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  40. 40.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag

Answer key

  1. 4
  2. starts a new line
  3. Maths fun
  4. 13
  5. <ol>
  6. True
  7. alt
  8. </b>
  9. <img>
  10. <h6>
  11. 2
  12. </small>
  13. <a>
  14. 1
  15. <ol>
  16. True
  17. False
  18. Birthday cake
  19. a closing tag
  20. numbers
  21. <h1>
  22. 1
  23. an opening tag
  24. Play games
  25. a closing tag
  26. turns HTML into a page
  27. alt
  28. opens it in a new tab
  29. The full moon
  30. an empty tag
  31. True
  32. <h5>
  33. in the head
  34. <title>
  35. a paragraph
  36. a closing tag
  37. src
  38. in a new tab
  39. an opening tag
  40. a closing tag

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