← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 241 · 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.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  2. 2.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) <\u> (d) </u>
  3. 3.💬 Does the browser show comments on the page? (a) Yes (b) No
  4. 4.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) < (d) (
  5. 5.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h6> or <h4>? (a) <h4> (b) <h2> (c) <h6> (d) <h5>
  6. 6.Which of these goes in the body? (a) <style> (b) <title> (c) <h1> (d) <link rel="stylesheet">
  7. 7.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
  8. 8.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ul>
  9. 9.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
    (a) Cricket is fun. (b) Fun facts (c) My best friend (d) Hello, world!
  10. 10.Which of these is true of a web browser? (a) answers page requests (b) colours code to help us (c) is where we type code (d) turns HTML into a page
  11. 11.🔠 Are headings shown in bold by default? (a) Yes (b) No
  12. 12.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  13. 13.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  14. 14.Which of these has a closing tag? (a) <meta> (b) <img> (c) <input> (d) <p>
  15. 15.True or false: <input> is an empty tag. (a) True (b) False
  16. 16.🔗 Which address opens when you click this link?
    <a href="news.html">Contact us</a>
    (a) quiz.html (b) Contact us (c) news.html (d) games.html
  17. 17.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  18. 18.🔍 Which line is missing its closing tag?
    line 1: <p>Hello, world!</p>
    line 2: <em>Fun facts
    line 3: <h3>I love mangoes.</h3>
    (a) line 3 (b) line 2 (c) line 1
  19. 19.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
  20. 20.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
  21. 21.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  22. 22.True or false: a code editor colours code to help us. (a) False (b) True
  23. 23.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h3>? (a) <h6> (b) <h4> (c) <h3> (d) <h1>
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    <p>Fun facts</p>
  25. 25.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Fun facts</p>
    <p>Good morning!</p>
    <p>Hello, world!</p>
  26. 26.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  27. 27.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  28. 28.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt
  29. 29.🔢 In a basic web page file, which comes first: “<html>” or “<head>”? (a) <head> (b) <html>
  30. 30.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="350">
    (a) Our school bus (b) fort.jpg (c) tiger.jpg (d) bus.jpg
  31. 31.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Good morning!</p>
    <h2>Rain today</h2>
    <h2>I love mangoes.</h2>
  32. 32.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
  33. 33.🔍 One closing tag is missing. Which one?
    <p>Cricket is fun.</p>
    <u>My pets</u>
    <h2>The red kite
    (a) </p> (b) </h2> (c) </strong> (d) </u>
  34. 34.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    (a) Cricket is fun. (b) Good morning! (c) Fun facts (d) My pets
  35. 35.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h6> (d) <h1>
  36. 36.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  37. 37.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <p>Fun facts</p>
    (a) My best friend (b) Cricket is fun. (c) Fun facts (d) Our school trip
  38. 38.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) </h2> (c) <h2> (d) <h2/>
  39. 39.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  40. 40.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h3> (d) <h6>

Answer key

  1. a closing tag
  2. </u>
  3. No
  4. <
  5. <h6>
  6. <h1>
  7. <li>
  8. 4
  9. Hello, world!
  10. turns HTML into a page
  11. Yes
  12. in a new tab
  13. False
  14. <p>
  15. True
  16. news.html
  17. a closing tag
  18. line 2
  19. to leave notes
  20. <a>
  21. 4
  22. True
  23. <h6>
  24. 2
  25. 4
  26. Yes
  27. No
  28. src
  29. <html>
  30. bus.jpg
  31. 2
  32. <h5>
  33. </h2>
  34. My pets
  35. <h1>
  36. bullets
  37. Our school trip
  38. </h2>
  39. in the body
  40. <h6>

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