← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 822 · 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.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) editor (d) element
  2. 2.True or false: a web browser shows pages from the web. (a) True (b) False
  3. 3.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) </strong> (c) <strong> (d) <strong/>
  4. 4.🔍 One closing tag is missing. Which one?
    <p>My pets</p>
    <em>Fun facts</em>
    <i>I love mangoes.
    (a) </h1> (b) </i> (c) </em> (d) </p>
  5. 5.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
  7. 7.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>Fun facts</p>
    <h2>Hello, world!</h2>
  8. 8.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
  9. 9.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
  10. 10.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
  11. 11.True or false: <img> goes in the body. (a) True (b) False
  12. 12.📋 What number does the browser show next to “Grapes”?
    <ol start="3">
      <li>Mango</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
  13. 13.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>My best friend</p>
    <h2>My best friend</h2>
    <h2>My best friend</h2>
  14. 14.Which of these has a closing tag? (a) <ul> (b) <br> (c) <input> (d) <hr>
  15. 15.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) tags (d) pixels
  16. 16.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.🔍 One closing tag is missing. Which one?
    <b>Good morning!</b>
    <i>Fun facts
    <strong>I love mangoes.</strong>
    (a) </i> (b) </b> (c) </strong> (d) </h3>
  18. 18.🔍 Which line is missing its closing tag?
    line 1: <h2>Cricket is fun.
    line 2: <h3>Good morning!</h3>
    line 3: <strong>I love mangoes.</strong>
    (a) line 2 (b) line 1 (c) line 3
  19. 19.🔗 Which address opens when you click this link?
    <a href="art.html">Contact us</a>
    (a) art.html (b) Contact us (c) quiz.html (d) news.html
  20. 20.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) hides the link (d) opens it in a new tab
  21. 21.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  22. 22.True or false: HTML on its own cannot run a game loop. (a) False (b) True
  23. 23.True or false: <li> shows bullet points. (a) True (b) False
  24. 24.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) width (c) height (d) src
  25. 25.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
  26. 26.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  27. 27.True or false: <b> is an empty tag. (a) False (b) True
  28. 28.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h3>My pets</h3>
    <p>My pets</p>
  29. 29.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  30. 30.True or false: HTML on its own can show paragraphs. (a) False (b) True
  31. 31.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
  32. 32.🔗 Which address opens when you click this link?
    <a href="art.html">School news</a>
    (a) quiz.html (b) news.html (c) art.html (d) School news
  33. 33.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h3>? (a) <h6> (b) <h3> (c) <h2> (d) <h5>
  34. 34.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) fort.jpg (b) A tiger asleep (c) An old fort (d) width
  35. 35.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
  36. 36.True or false: <ul> is an unordered list. (a) True (b) False
  37. 37.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
  38. 38.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Rain today</p> -->
  39. 39.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  40. 40.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>

Answer key

  1. element
  2. True
  3. </strong>
  4. </i>
  5. in the body
  6. 1
  7. 3
  8. <a>
  9. 1
  10. a code editor
  11. True
  12. 4
  13. 2
  14. <ul>
  15. tags
  16. has a closing tag
  17. </i>
  18. line 1
  19. art.html
  20. opens it in a new tab
  21. an opening tag
  22. True
  23. False
  24. alt
  25. href
  26. No
  27. False
  28. 2
  29. Yes
  30. True
  31. an attribute
  32. art.html
  33. <h2>
  34. An old fort
  35. <h1>
  36. True
  37. on the browser tab
  38. 2
  39. bullets
  40. <h1>

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