← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 564 · 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.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h6> or <h4>? (a) <h6> (b) <h4> (c) <h3> (d) <h1>
  2. 2.📝 What does <p> make? (a) a table (b) a picture (c) a link (d) a paragraph
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
  4. 4.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <p>Fun facts</p>
  5. 5.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
  6. 6.True or false: <p> goes in the body. (a) True (b) False
  7. 7.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  8. 8.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  9. 9.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  10. 10.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to make it bigger (d) to load it faster
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="50">
  12. 12.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
  13. 13.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h3>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
  14. 14.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h2>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
  15. 15.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  16. 16.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h3> or <h5>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
  17. 17.Which of these is an opening tag? (a) <p> (b) </title> (c) </li> (d) </p>
  18. 18.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) map.png (b) kite.png (c) A tiger asleep (d) tiger.jpg
  19. 19.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) https://example.com (b) Art corner (c) href (d) School news
  20. 20.🔍 Which is the odd one out? (a) shows line numbers (b) turns HTML into a page (c) colours code to help us (d) is where we type code
  21. 21.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h6> (d) <h1>
  22. 22.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) href (b) about.html (c) About us (d) Play games
  23. 23.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
  24. 24.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) index.html (b) Space Facts (c) Try this poha. (d) Easy snacks
  25. 25.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
  26. 26.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
  27. 27.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h3>? (a) <h5> (b) <h6> (c) <h4> (d) <h3>
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <strong>The red kite</strong>
    line 2: <u>Cricket is fun.</u>
    line 3: <h3>My best friend
    (a) line 2 (b) line 3 (c) line 1
  29. 29.🔗 Which words do you click on?
    <a href="about.html">Contact us</a>
    (a) Contact us (b) href (c) about.html (d) Visit the site
  30. 30.Which of these is an opening tag? (a) <b> (b) </li> (c) </b> (d) </p>
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow</p>
  32. 32.Which of these is true of a code editor? (a) opens web pages for us (b) saves our .html files (c) stores a website’s files (d) sends pages over the net
  33. 33.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
  34. 34.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h6>? (a) <h6> (b) <h5> (c) <h4> (d) <h2>
  35. 35.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  36. 36.🔗 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">
  37. 37.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
  38. 38.🔍 One closing tag is missing. Which one?
    <h3>Cricket is fun.</h3>
    <strong>Hello, world!</strong>
    <u>Good morning!
    (a) </strong> (b) </em> (c) </u> (d) </h3>
  39. 39.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  40. 40.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    <p>My best friend</p>
    (a) Hello, world! (b) My best friend (c) Rain today

Answer key

  1. <h1>
  2. a paragraph
  3. 2
  4. 2
  5. 2
  6. True
  7. 5
  8. has a closing tag
  9. an opening tag
  10. to describe the image
  11. 50
  12. 2
  13. <h2>
  14. <h1>
  15. Yes
  16. <h5>
  17. <p>
  18. tiger.jpg
  19. Art corner
  20. turns HTML into a page
  21. <h6>
  22. Play games
  23. <li>
  24. Space Facts
  25. href
  26. opens it in a new tab
  27. <h3>
  28. line 3
  29. Contact us
  30. <b>
  31. 2
  32. saves our .html files
  33. <h6>
  34. <h2>
  35. numbers
  36. <a href="about.html">
  37. <!--
  38. </u>
  39. False
  40. Hello, world!

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