← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 414 · 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 has a closing tag? (a) <p> (b) <br> (c) <meta> (d) <input>
  2. 2.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Rivers flow</p>
  3. 3.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
  4. 4.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  5. 5.True or false: <ul> is one item of a list. (a) True (b) False
  6. 6.Which of these goes in the body? (a) <ul> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <style>
  7. 7.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="300">
    (a) Our school bus (b) tiger.jpg (c) bus.jpg (d) fort.jpg
  8. 8.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing<br>Sky is blue<br>Kites fly high</p>
  9. 9.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
  10. 10.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to make it bigger (d) to load it faster
  11. 11.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  12. 12.Which of these has a closing tag? (a) <br> (b) <hr> (c) <img> (d) <h1>
  13. 13.True or false: <hr> has a closing tag. (a) False (b) True
  14. 14.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My Hobbies (b) I like to read. (c) All about me (d) body
  15. 15.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a dot . (d) a slash /
  16. 16.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Fun facts</p>
    <h2>Cricket is fun.</h2>
  17. 17.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    <p>My best friend</p>
    <p>My pets</p>
    (a) Good morning! (b) My pets (c) The red kite (d) My best friend
  18. 18.Which of these is a closing tag? (a) <body> (b) <h1> (c) <title> (d) </b>
  19. 19.True or false: HTML on its own cannot pick a random number. (a) False (b) True
  20. 20.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Hello, world! (c) Our school trip (d) Rain today
  21. 21.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h1> or <h3>? (a) <h3> (b) <h2> (c) <h1> (d) <h4>
  22. 22.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>The red kite</p>
    <h4>Rain today</h4>
    <p>The red kite</p>
    <h3>Cricket is fun.</h3>
  23. 23.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as a new line (d) as one space
  24. 24.True or false: in <img>, src shows if the image fails. (a) False (b) True
  25. 25.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h5> or <h3>? (a) <h1> (b) <h3> (c) <h5> (d) <h6>
  26. 26.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h5>? (a) <h5> (b) <h2> (c) <h6> (d) <h3>
  27. 27.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <!DOCTYPE html> (d) <html>
  28. 28.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  29. 29.True or false: <ul> shows bullet points. (a) False (b) True
  30. 30.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My pets</p> -->
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Birds sing<br>Sky is blue<br>Stars shine</p>
  32. 32.🏷️ Which is the closing tag for <em>? (a) <em/> (b) <em> (c) <\em> (d) </em>
  33. 33.🔍 One closing tag is missing. Which one?
    <small>Fun facts</small>
    <h3>Good morning!
    <strong>The red kite</strong>
    (a) </p> (b) </h3> (c) </strong> (d) </small>
  34. 34.🔢 In a basic web page file, which comes first: “<html>” or “<!DOCTYPE html>”? (a) <html> (b) <!DOCTYPE html>
  35. 35.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) width (b) Our school bus (c) bus.jpg (d) An old fort
  36. 36.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h4>? (a) <h4> (b) <h3> (c) <h6> (d) <h2>
  37. 37.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h6> or <h5>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
  38. 38.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  39. 39.Which of these is true of a web browser? (a) hosts websites online (b) shows pages from the web (c) colours code to help us (d) is where we type code
  40. 40.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    (a) Cricket is fun. (b) Hello, world! (c) I love mangoes.

Answer key

  1. <p>
  2. 2
  3. <li>
  4. Yes
  5. False
  6. <ul>
  7. bus.jpg
  8. 4
  9. 4
  10. to describe the image
  11. an empty tag
  12. <h1>
  13. False
  14. All about me
  15. a slash /
  16. 2
  17. The red kite
  18. </b>
  19. True
  20. Rain today
  21. <h1>
  22. 3
  23. as one space
  24. False
  25. <h1>
  26. <h2>
  27. <!DOCTYPE html>
  28. has a closing tag
  29. True
  30. 2
  31. 5
  32. </em>
  33. </h3>
  34. <!DOCTYPE html>
  35. Our school bus
  36. <h6>
  37. <h6>
  38. No
  39. shows pages from the web
  40. Hello, world!

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