← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 921 · 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.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  2. 2.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>Fun facts</p>
    <p>My pets</p>
    <h2>Fun facts</h2>
  3. 3.True or false: HTML on its own can pick a random number. (a) False (b) True
  4. 4.Which of these is an empty tag? (a) <h1> (b) <li> (c) <ul> (d) <hr>
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="200">
    (a) The full moon (b) Our school bus (c) moon.png (d) width
  6. 6.True or false: <h1> is an empty tag. (a) True (b) False
  7. 7.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <p>Good morning!
    line 2: <strong>The red kite</strong>
    line 3: <small>Hello, world!</small>
    (a) line 2 (b) line 1 (c) line 3
  9. 9.True or false: in <img>, src shows if the image fails. (a) True (b) False
  10. 10.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
  11. 11.🔗 Which attribute holds the address of a link? (a) id (b) src (c) alt (d) href
  12. 12.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
  13. 13.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a dot . (d) a hash #
  14. 14.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing<br>Stars shine</p>
  15. 15.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>My pets</h4>
    <h4>My best friend</h4>
    <p>Fun facts</p>
  16. 16.True or false: a code editor shows line numbers. (a) False (b) True
  17. 17.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
  18. 18.True or false: HTML on its own cannot run a game loop. (a) True (b) False
  19. 19.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
  20. 20.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) art.html (b) maths.html (c) news.html (d) Take the quiz
  21. 21.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) src (d) width
  22. 22.Which of these is an empty tag? (a) <ul> (b) <title> (c) <img> (d) <b>
  23. 23.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to describe the image (d) to colour it
  24. 24.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="300">
    (a) moon.png (b) fort.jpg (c) bus.jpg (d) The full moon
  25. 25.True or false: HTML on its own cannot count button clicks. (a) True (b) False
  26. 26.Which of these goes in the body? (a) <img> (b) <title> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
  27. 27.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) [ (d) (
  28. 28.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>My pets</p>
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
  29. 29.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Fun facts</p> -->
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
  31. 31.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h1> or <h4>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
  32. 32.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  33. 33.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
  34. 34.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  35. 35.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  36. 36.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h2>? (a) <h3> (b) <h5> (c) <h1> (d) <h2>
  37. 37.💬 Does the browser show comments on the page? (a) Yes (b) No
  38. 38.Which of these goes in the head? (a) <a> (b) <title> (c) <h1> (d) <p>
  39. 39.🔍 One closing tag is missing. Which one?
    <h3>Rain today
    <small>My best friend</small>
    <em>Hello, world!</em>
    (a) </i> (b) </em> (c) </h3> (d) </small>
  40. 40.True or false: a web browser sends pages over the net. (a) True (b) False

Answer key

  1. an empty tag
  2. 4
  3. False
  4. <hr>
  5. The full moon
  6. False
  7. a web browser
  8. line 1
  9. False
  10. 5
  11. href
  12. <h1>
  13. a slash /
  14. 3
  15. 3
  16. True
  17. <ul>
  18. True
  19. on the browser tab
  20. maths.html
  21. src
  22. <img>
  23. to describe the image
  24. moon.png
  25. True
  26. <img>
  27. <
  28. 4
  29. to leave notes
  30. 2
  31. <h1>
  32. Yes
  33. <a href="about.html">
  34. a closing tag
  35. a closing tag
  36. <h1>
  37. No
  38. <title>
  39. </h3>
  40. False

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