← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 971 · 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 of these is true of a web browser? (a) colours code to help us (b) shows pages from the web (c) stores a website’s files (d) shows line numbers
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <small>Good morning!</small>
    line 2: <b>Rain today</b>
    line 3: <p>I love mangoes.
    (a) line 1 (b) line 2 (c) line 3
  3. 3.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
    (a) Rain today (b) I love mangoes. (c) The red kite
  4. 4.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  5. 5.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  6. 6.Which of these is an opening tag? (a) <b> (b) </h1> (c) </title> (d) </b>
  7. 7.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Rain today</h2>
    <h2>Hello, world!</h2>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <h2>Cricket is fun.</h2>
  8. 8.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h1>? (a) <h1> (b) <h5> (c) <h3> (d) <h4>
  9. 9.🔍 One closing tag is missing. Which one?
    <i>Fun facts
    <em>I love mangoes.</em>
    <p>Our school trip</p>
    (a) </em> (b) </i> (c) </p> (d) </h3>
  10. 10.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
  11. 11.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h1> or <h3>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
  12. 12.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
  13. 13.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
  14. 14.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt
  15. 15.True or false: <li> has a closing tag. (a) False (b) True
  16. 16.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
  17. 17.🔍 One closing tag is missing. Which one?
    <em>Fun facts</em>
    <u>My pets
    <i>Our school trip</i>
    (a) </i> (b) </u> (c) </em> (d) </h2>
  18. 18.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    (a) The red kite (b) My best friend (c) I love mangoes.
  19. 19.True or false: <table> goes in the head. (a) False (b) True
  20. 20.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>My best friend</h2>
    <h2>I love mangoes.</h2>
  21. 21.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Banana</li>
    </ul>
  22. 22.Which of these is a closing tag? (a) <h1> (b) </h1> (c) <p> (d) <b>
  23. 23.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) Play games (b) About us (c) href (d) contact.html
  24. 24.True or false: HTML on its own cannot make headings. (a) True (b) False
  25. 25.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <h2>I love mangoes.</h2>
    <h2>Cricket is fun.</h2>
    <h2>Cricket is fun.</h2>
    <h2>My best friend</h2>
    <h2>Rain today</h2>
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
  27. 27.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Link (d) Language
  28. 28.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  29. 29.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Good morning!</p>
    <h3>Fun facts</h3>
  30. 30.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <title> (d) <img>
  31. 31.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h3> or <h2>? (a) <h3> (b) <h1> (c) <h4> (d) <h2>
  32. 32.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    (a) The red kite (b) Good morning! (c) My pets (d) I love mangoes.
  33. 33.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
  34. 34.💾 A web page file usually ends with which extension? (a) .mp3 (b) .png (c) .txt (d) .html
  35. 35.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
  36. 36.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h1>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
  37. 37.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
  38. 38.💬 How does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
  39. 39.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a hash # (d) a dollar $
  40. 40.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the body (d) the head

Answer key

  1. shows pages from the web
  2. line 3
  3. Rain today
  4. in the body
  5. No
  6. <b>
  7. 3
  8. <h1>
  9. </i>
  10. <ul>
  11. <h5>
  12. 2
  13. element
  14. src
  15. True
  16. 4
  17. </u>
  18. I love mangoes.
  19. False
  20. 1
  21. 6
  22. </h1>
  23. Play games
  24. False
  25. 1
  26. 2
  27. Language
  28. Yes
  29. 2
  30. <img>
  31. <h4>
  32. I love mangoes.
  33. <h1>
  34. .html
  35. <!DOCTYPE html>
  36. <h1>
  37. href
  38. <!--
  39. a slash /
  40. the body

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