← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 954 · 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.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <head> (c) </body> (d) </html>
  2. 2.🔍 One closing tag is missing. Which one?
    <h1>My pets</h1>
    <b>The red kite
    <strong>Our school trip</strong>
    (a) </h2> (b) </h1> (c) </strong> (d) </b>
  3. 3.🔠 Are headings shown in bold by default? (a) No (b) Yes
  4. 4.Which of these is an opening tag? (a) </body> (b) </li> (c) </p> (d) <title>
  5. 5.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h5>? (a) <h6> (b) <h3> (c) <h5> (d) <h1>
  6. 6.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h2>My best friend</h2>
    <h4>My best friend</h4>
    <p>Fun facts</p>
  7. 7.🔍 Which line is missing its closing tag?
    line 1: <h3>Cricket is fun.</h3>
    line 2: <em>Hello, world!
    line 3: <strong>I love mangoes.</strong>
    (a) line 3 (b) line 1 (c) line 2
  8. 8.Which of these has a closing tag? (a) <p> (b) <input> (c) <img> (d) <meta>
  9. 9.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  10. 10.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  11. 11.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) has an address bar (d) hosts websites online
  12. 12.True or false: <b> is an empty tag. (a) True (b) False
  13. 13.📋 What number does the browser show next to “Grapes”?
    <ol start="2">
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ol>
  14. 14.🔗 Which address opens when you click this link?
    <a href="contact.html">School news</a>
    (a) maths.html (b) contact.html (c) School news (d) https://example.com
  15. 15.📋 What number does the browser show next to “Guava”?
    <ol start="2">
      <li>Banana</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Orange</li>
    </ol>
  16. 16.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) fort.jpg (b) bus.jpg (c) tiger.jpg (d) Our school bus
  17. 17.🔗 Which address opens when you click this link?
    <a href="art.html">About us</a>
    (a) news.html (b) art.html (c) quiz.html (d) About us
  18. 18.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <h3> (d) <p>
  19. 19.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) https://example.com (b) href (c) About us (d) Play games
  20. 20.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <img> (d) <a>
  21. 21.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
  22. 22.💬 How does an HTML comment end? (a) >> (b) --> (c) */ (d) //
  23. 23.Which of these is a closing tag? (a) <body> (b) </li> (c) <p> (d) <title>
  24. 24.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h4> or <h2>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
  25. 25.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
  26. 26.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
  27. 27.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>Our school trip</h4>
    <p>I love mangoes.</p>
  28. 28.🔗 Where does this link open?
    <a href="games.html" target="_blank">Visit the site</a>
    (a) in the same tab (b) in a new tab
  29. 29.Which of these is a closing tag? (a) </body> (b) <b> (c) <li> (d) <title>
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Fun facts</p> -->
    <!-- <p>Cricket is fun.</p> -->
  31. 31.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <ul> (c) <meta charset="utf-8"> (d) <style>
  32. 32.Which of these is true of a web server? (a) shows line numbers (b) shows pages from the web (c) stores a website’s files (d) colours code to help us
  33. 33.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
  34. 34.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
  35. 35.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
  36. 36.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h4>? (a) <h4> (b) <h6> (c) <h2> (d) <h3>
  37. 37.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  38. 38.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  39. 39.True or false: <img> goes in the body. (a) False (b) True
  40. 40.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->

Answer key

  1. </html>
  2. </b>
  3. Yes
  4. <title>
  5. <h6>
  6. 3
  7. line 2
  8. <p>
  9. Yes
  10. Yes
  11. hosts websites online
  12. False
  13. 3
  14. contact.html
  15. 4
  16. bus.jpg
  17. art.html
  18. <h6>
  19. Play games
  20. <img>
  21. src
  22. -->
  23. </li>
  24. <h6>
  25. <h5>
  26. href
  27. 2
  28. in a new tab
  29. </body>
  30. 1
  31. <ul>
  32. stores a website’s files
  33. <h1>
  34. <a href="about.html">
  35. on the browser tab
  36. <h6>
  37. in the head
  38. a closing tag
  39. True
  40. 2

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