← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 338 · 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.True or false: HTML on its own can show paragraphs. (a) True (b) False
  2. 2.True or false: HTML on its own cannot pick a random number. (a) False (b) True
  3. 3.Which of these has a closing tag? (a) <input> (b) <img> (c) <meta> (d) <b>
  4. 4.True or false: in <img>, src sets how tall it is. (a) False (b) True
  5. 5.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
  6. 6.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Jamun</li>
    </ul>
  7. 7.Which of these is true of a web server? (a) shows line numbers (b) sends pages over the net (c) turns HTML into a page (d) saves our .html files
  8. 8.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>Cricket is fun.</h2>
    <h2>Rain today</h2>
    <p>Cricket is fun.</p>
  9. 9.🔍 One closing tag is missing. Which one?
    <h1>Hello, world!</h1>
    <em>I love mangoes.</em>
    <p>Our school trip
    (a) </em> (b) </p> (c) </h1> (d) </h2>
  10. 10.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">
  11. 11.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
  12. 12.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>The red kite</p>
    <h4>Good morning!</h4>
    <h4>Hello, world!</h4>
    <p>Our school trip</p>
  13. 13.📋 What number does the browser show next to “Orange”?
    <ol start="7">
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
  14. 14.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) address (d) editor
  15. 15.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    (a) I love mangoes. (b) Good morning! (c) Fun facts
  16. 16.True or false: a code editor has an address bar. (a) True (b) False
  17. 17.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="150">
    (a) A red kite (b) cake.jpg (c) kite.png (d) map.png
  18. 18.🔗 Which words do you click on?
    <a href="https://example.com">Maths fun</a>
    (a) Art corner (b) https://example.com (c) href (d) Maths fun
  19. 19.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  20. 20.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
  21. 21.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h3>? (a) <h4> (b) <h5> (c) <h3> (d) <h1>
  22. 22.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <p>
  23. 23.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h1> or <h4>? (a) <h3> (b) <h2> (c) <h1> (d) <h4>
  24. 24.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
  25. 25.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) About us (b) https://example.com (c) Play games (d) href
  26. 26.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) About us (b) Play games (c) href (d) games.html
  27. 27.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
  28. 28.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Space Facts (b) I like to read. (c) Match report (d) body
  29. 29.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  30. 30.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to describe the image (d) to colour it
  31. 31.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as a dot (d) as one space
  32. 32.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <li> (c) <ol>
  33. 33.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  34. 34.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Rain today</p>
    <h3>Good morning!</h3>
    <p>Fun facts</p>
  35. 35.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <p> (c) <br> (d) <h6>
  36. 36.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
  37. 37.🔗 Which address opens when you click this link?
    <a href="about.html">School news</a>
    (a) about.html (b) contact.html (c) https://example.com (d) School news
  38. 38.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h3>? (a) <h1> (b) <h2> (c) <h5> (d) <h3>
  39. 39.💬 Does the browser show comments on the page? (a) Yes (b) No
  40. 40.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <input> (d) <p>

Answer key

  1. True
  2. True
  3. <b>
  4. False
  5. a web server
  6. 3
  7. sends pages over the net
  8. 3
  9. </p>
  10. <a href="about.html">
  11. width
  12. 3
  13. 10
  14. element
  15. I love mangoes.
  16. False
  17. kite.png
  18. Maths fun
  19. No
  20. a paragraph
  21. <h1>
  22. <p>
  23. <h1>
  24. <!--
  25. Play games
  26. Play games
  27. a code editor
  28. Match report
  29. <ol>
  30. to describe the image
  31. as one space
  32. <ol>
  33. False
  34. 2
  35. <h1>
  36. <
  37. about.html
  38. <h5>
  39. No
  40. <input>

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