← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 747 · 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.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to colour it (d) to load it faster
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
  3. 3.True or false: HTML on its own cannot make a form. (a) True (b) False
  4. 4.True or false: <ol> lists steps in order. (a) False (b) True
  5. 5.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
  6. 6.Which of these is true of a web browser? (a) shows line numbers (b) turns HTML into a page (c) stores a website’s files (d) saves our .html files
  7. 7.📝 What does <br> do? (a) adds a picture (b) starts a new line (c) makes a list (d) makes text bold
  8. 8.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  9. 9.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to leave notes (d) to make links
  10. 10.Which of these is a closing tag? (a) <li> (b) </p> (c) <b> (d) <p>
  11. 11.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
  12. 12.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) index.html (c) Class 7 Blog (d) Welcome!
  13. 13.🔠 Are headings shown in bold by default? (a) Yes (b) No
  14. 14.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>My pets</h2>
    <h2>Cricket is fun.</h2>
    <p>Rain today</p>
    <h2>Good morning!</h2>
  15. 15.📝 What does <hr> draw? (a) a table (b) a picture (c) a link (d) a line across the page
  16. 16.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
  17. 17.Which of these is true of a web browser? (a) saves our .html files (b) colours code to help us (c) is where we type code (d) shows pages from the web
  18. 18.🔍 One closing tag is missing. Which one?
    <small>Cricket is fun.
    <i>Our school trip</i>
    <h2>I love mangoes.</h2>
    (a) </h2> (b) </i> (c) </b> (d) </small>
  19. 19.True or false: <style> goes in the body. (a) True (b) False
  20. 20.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
  21. 21.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h1> or <h2>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
  22. 22.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  23. 23.True or false: <meta> is an empty tag. (a) True (b) False
  24. 24.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  25. 25.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) Class 7 Blog (c) index.html (d) My drawings
  26. 26.True or false: <meta> has a closing tag. (a) True (b) False
  27. 27.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
  28. 28.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) https://example.com (b) href (c) School news (d) Art corner
  29. 29.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h3> or <h2>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
  30. 30.True or false: <ol> is an ordered list. (a) True (b) False
  31. 31.Which of these is a closing tag? (a) <b> (b) </li> (c) <title> (d) <body>
  32. 32.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Mango</li>
    </ul>
  33. 33.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  34. 34.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
  35. 35.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Fun facts</h2>
    <p>My pets</p>
    <p>Rain today</p>
    <p>The red kite</p>
    <p>My pets</p>
  36. 36.📋 What number does the browser show next to “Litchi”?
    <ol start="5">
      <li>Papaya</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
  37. 37.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Modern (c) Markup (d) Machine
  38. 38.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <p>My best friend</p>
    (a) My best friend (b) I love mangoes. (c) Hello, world! (d) My pets
  39. 39.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  40. 40.📋 Which list tag is an ordered list? (a) <ol> (b) <li> (c) <ul>

Answer key

  1. to describe the image
  2. 3
  3. False
  4. True
  5. 4
  6. turns HTML into a page
  7. starts a new line
  8. -->
  9. to leave notes
  10. </p>
  11. <a>
  12. Class 7 Blog
  13. Yes
  14. 2
  15. a line across the page
  16. alt
  17. shows pages from the web
  18. </small>
  19. False
  20. on the browser tab
  21. <h1>
  22. in the body
  23. True
  24. No
  25. Class 7 Blog
  26. False
  27. False
  28. Art corner
  29. <h4>
  30. True
  31. </li>
  32. 5
  33. an opening tag
  34. <a href="about.html">
  35. 5
  36. 9
  37. Markup
  38. Hello, world!
  39. <ol>
  40. <ol>

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