← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 101 · 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.🔗 Where does this link open?
    <a href="https://example.com">Art corner</a>
    (a) in a new tab (b) in the same tab
  2. 2.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) maths.html (b) About us (c) art.html (d) https://example.com
  3. 3.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  4. 4.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) answers page requests (d) has an address bar
  5. 5.🏷️ Which is the closing tag for <small>? (a) <small> (b) <\small> (c) </small> (d) <small/>
  6. 6.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) has an address bar (d) shows line numbers
  7. 7.True or false: <p> goes in the head. (a) True (b) False
  8. 8.🔍 One closing tag is missing. Which one?
    <p>My pets</p>
    <h3>I love mangoes.</h3>
    <b>Hello, world!
    (a) </h3> (b) </b> (c) </i> (d) </p>
  9. 9.True or false: in <img>, src tells which image to load. (a) True (b) False
  10. 10.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) href (b) Play games (c) maths.html (d) Take the quiz
  11. 11.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) saves our .html files (d) hosts websites online
  12. 12.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to add colour (d) to make links
  13. 13.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  14. 14.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h1>? (a) <h1> (b) <h6> (c) <h2> (d) <h4>
  15. 15.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <h3>Fun facts</h3>
    <p>Rain today</p>
  16. 16.True or false: <h1> is an empty tag. (a) True (b) False
  17. 17.True or false: a web browser shows pages from the web. (a) True (b) False
  18. 18.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) </u> (d) <\u>
  19. 19.🔍 Which is the odd one out? (a) turns HTML into a page (b) stores a website’s files (c) sends pages over the net (d) hosts websites online
  20. 20.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
  21. 21.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    (a) Our school trip (b) The red kite (c) Cricket is fun.
  22. 22.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
  24. 24.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) All about me (b) Here is my best one. (c) My Hobbies (d) index.html
  25. 25.True or false: in <img>, width is read by screen readers. (a) False (b) True
  26. 26.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h1>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
  27. 27.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <p> (d) <ul>
  28. 28.🏷️ Which is the closing tag for <h3>? (a) </h3> (b) <h3/> (c) <\h3> (d) <h3>
  29. 29.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <h2>Cricket is fun.</h2>
    <p>Hello, world!</p>
  30. 30.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) href (b) Take the quiz (c) games.html (d) School news
  31. 31.🔍 One closing tag is missing. Which one?
    <em>Cricket is fun.</em>
    <small>Hello, world!</small>
    <u>Fun facts
    (a) </small> (b) </h1> (c) </em> (d) </u>
  32. 32.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Hot Tags (c) Home Text (d) High Tech
  33. 33.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    <p>Good morning!</p>
    (a) Rain today (b) Good morning! (c) Our school trip (d) Fun facts
  34. 34.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Machine (d) Mouse
  35. 35.Which of these is an empty tag? (a) <img> (b) <b> (c) <p> (d) <h1>
  36. 36.💬 Does the browser show comments on the page? (a) Yes (b) No
  37. 37.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h5> or <h3>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
  38. 38.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) height (d) alt
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="250">
    (a) Map of India (b) width (c) kite.png (d) A red kite
  40. 40.Which of these is an opening tag? (a) </p> (b) </body> (c) <b> (d) </h1>

Answer key

  1. in the same tab
  2. https://example.com
  3. True
  4. answers page requests
  5. </small>
  6. has an address bar
  7. False
  8. </b>
  9. True
  10. Take the quiz
  11. hosts websites online
  12. to leave notes
  13. False
  14. <h6>
  15. 2
  16. False
  17. True
  18. </u>
  19. turns HTML into a page
  20. <!DOCTYPE html>
  21. Cricket is fun.
  22. an empty tag
  23. 1
  24. My Hobbies
  25. False
  26. <h6>
  27. <li>
  28. </h3>
  29. 5
  30. School news
  31. </u>
  32. HyperText
  33. Our school trip
  34. Markup
  35. <img>
  36. No
  37. <h1>
  38. height
  39. A red kite
  40. <b>

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