← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 44 · 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 is the closing tag for <i>? (a) <\i> (b) </i> (c) <i/> (d) <i>
  2. 2.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    <p>Fun facts</p>
    (a) Fun facts (b) My best friend (c) My pets
  3. 3.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) Visit the site (b) Maths fun (c) https://example.com (d) href
  4. 4.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
  5. 5.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  6. 6.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="100">
  7. 7.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    <p>Good morning!</p>
  9. 9.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My drawings (b) I like to read. (c) body (d) Space Facts
  10. 10.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
  11. 11.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  12. 12.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
  13. 13.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  14. 14.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
  15. 15.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <!-- <p>Fun facts</p> -->
    (a) The red kite (b) I love mangoes. (c) Fun facts
  16. 16.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
  17. 17.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>My pets</p>
    <p>Good morning!</p>
    <h3>Fun facts</h3>
  18. 18.True or false: HTML on its own cannot run a game loop. (a) True (b) False
  19. 19.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  20. 20.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <p>The red kite</p>
    <p>The red kite</p>
    <h2>Hello, world!</h2>
    <p>I love mangoes.</p>
  21. 21.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h6> (d) <h1>
  22. 22.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  23. 23.🔗 Which attribute holds the address of a link? (a) id (b) src (c) alt (d) href
  24. 24.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h1>? (a) <h3> (b) <h1> (c) <h6> (d) <h2>
  25. 25.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  26. 26.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  27. 27.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  28. 28.🔗 Which address opens when you click this link?
    <a href="maths.html">About us</a>
    (a) About us (b) news.html (c) maths.html (d) art.html
  29. 29.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to describe the image (d) to load it faster
  30. 30.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <p>My pets</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Our school trip (c) My pets (d) My best friend
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) Birthday cake (b) width (c) A happy dog (d) cake.jpg
  32. 32.Which of these is an opening tag? (a) </b> (b) </body> (c) </h1> (d) <p>
  33. 33.🔍 One closing tag is missing. Which one?
    <em>Good morning!</em>
    <h2>My pets</h2>
    <strong>Cricket is fun.
    (a) </h1> (b) </strong> (c) </h2> (d) </em>
  34. 34.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
  35. 35.True or false: <ol> shows bullet points. (a) False (b) True
  36. 36.🔍 One closing tag is missing. Which one?
    <i>Our school trip
    <h3>Good morning!</h3>
    <h2>My pets</h2>
    (a) </h2> (b) </small> (c) </h3> (d) </i>
  37. 37.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>My best friend</p>
    <p>My best friend</p>
    <h4>Fun facts</h4>
    <h3>My pets</h3>
  38. 38.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  39. 39.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
  40. 40.🔍 One closing tag is missing. Which one?
    <u>My best friend</u>
    <h1>My pets
    <strong>Cricket is fun.</strong>
    (a) </h1> (b) </strong> (c) </h2> (d) </u>

Answer key

  1. </i>
  2. My pets
  3. Visit the site
  4. 2
  5. <a href="about.html">
  6. 100
  7. <ul>
  8. 2
  9. My drawings
  10. <li>
  11. Yes
  12. <a>
  13. True
  14. a paragraph
  15. Fun facts
  16. a code editor
  17. 2
  18. True
  19. an opening tag
  20. 5
  21. <h1>
  22. an opening tag
  23. href
  24. <h6>
  25. <ul>
  26. <!DOCTYPE html>
  27. an empty tag
  28. maths.html
  29. to describe the image
  30. My best friend
  31. Birthday cake
  32. <p>
  33. </strong>
  34. width
  35. False
  36. </i>
  37. 3
  38. 5
  39. <li>
  40. </h1>

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