← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 166 · 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: <ul> shows 1, 2, 3 numbers. (a) False (b) True
  2. 2.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) sends pages over the net (d) colours code to help us
  3. 3.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>The red kite</h2>
    <p>My pets</p>
  4. 4.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) height (d) width
  5. 5.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
  6. 6.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
  7. 7.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="200">
    (a) tiger.jpg (b) bus.jpg (c) fort.jpg (d) Our school bus
  8. 8.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <p>My best friend</p>
    <h2>Fun facts</h2>
  9. 9.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
  10. 10.🔍 Which is the odd one out? (a) is where we type code (b) shows pages from the web (c) shows line numbers (d) saves our .html files
  11. 11.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  12. 12.📋 Which list tag lists steps in order? (a) <ol> (b) <ul> (c) <li>
  13. 13.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
  14. 14.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
  15. 15.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  16. 16.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
  17. 17.💬 Does the browser show comments on the page? (a) No (b) Yes
  18. 18.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>My pets</h3>
    <p>Cricket is fun.</p>
    <h4>The red kite</h4>
  19. 19.🔍 One closing tag is missing. Which one?
    <strong>My best friend
    <p>Good morning!</p>
    <h2>Fun facts</h2>
    (a) </p> (b) </strong> (c) </h2> (d) </small>
  20. 20.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
  21. 21.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h4>? (a) <h5> (b) <h1> (c) <h2> (d) <h4>
  22. 22.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  23. 23.True or false: in <img>, alt is read by screen readers. (a) False (b) True
  24. 24.🔍 One closing tag is missing. Which one?
    <h1>My best friend</h1>
    <small>The red kite</small>
    <em>Hello, world!
    (a) </h1> (b) </p> (c) </small> (d) </em>
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
  26. 26.True or false: <ol> is an ordered list. (a) False (b) True
  27. 27.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
    </ul>
  28. 28.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h1>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
  29. 29.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    (a) Cricket is fun. (b) Hello, world! (c) My pets
  30. 30.📄 Can HTML on its own make a form? (a) Yes (b) No
  31. 31.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) maths.html (b) https://example.com (c) Contact us (d) contact.html
  32. 32.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
  33. 33.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) width (c) src (d) height
  34. 34.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
  35. 35.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>The red kite</p>
    <p>Our school trip</p>
    <h2>Hello, world!</h2>
    <h3>My pets</h3>
  36. 36.🌐 Which one shows pages from the web? (a) a web browser (b) a code editor (c) a web server
  37. 37.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
  38. 38.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <!DOCTYPE html> (d) <html>
  39. 39.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <p>Cricket is fun.</p>
  40. 40.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False

Answer key

  1. False
  2. sends pages over the net
  3. 2
  4. src
  5. opens it in a new tab
  6. 3
  7. bus.jpg
  8. 3
  9. <a href="about.html">
  10. shows pages from the web
  11. an empty tag
  12. <ol>
  13. 3
  14. 3
  15. has a closing tag
  16. to leave notes
  17. No
  18. 3
  19. </strong>
  20. a code editor
  21. <h1>
  22. an empty tag
  23. True
  24. </em>
  25. 1
  26. True
  27. 2
  28. <h1>
  29. My pets
  30. Yes
  31. contact.html
  32. <a>
  33. alt
  34. 6
  35. 3
  36. a web browser
  37. 6
  38. <!DOCTYPE html>
  39. 3
  40. False

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