← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 964 · 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.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>The red kite</p>
    <h3>Our school trip</h3>
    <p>Our school trip</p>
    <h3>My best friend</h3>
  2. 2.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  3. 3.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="300">
  4. 4.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
  5. 5.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
  6. 6.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
  7. 7.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  8. 8.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 10 (d) 4
  9. 9.🔗 Which words do you click on?
    <a href="quiz.html">Take the quiz</a>
    (a) Take the quiz (b) Play games (c) quiz.html (d) href
  10. 10.📝 What does <hr> draw? (a) a table (b) a picture (c) a link (d) a line across the page
  11. 11.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
  12. 12.🔗 Which address opens when you click this link?
    <a href="about.html">Visit the site</a>
    (a) Visit the site (b) contact.html (c) https://example.com (d) about.html
  13. 13.True or false: <ol> lists steps in order. (a) False (b) True
  14. 14.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
  15. 15.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="350">
  16. 16.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h2> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
  17. 17.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    (a) Fun facts (b) Cricket is fun. (c) Rain today (d) The red kite
  18. 18.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    (a) I love mangoes. (b) My pets (c) Rain today (d) Cricket is fun.
  19. 19.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
  20. 20.🔍 One closing tag is missing. Which one?
    <h3>Rain today</h3>
    <em>Hello, world!
    <b>I love mangoes.</b>
    (a) </em> (b) </h3> (c) </b> (d) </h2>
  21. 21.🧱 HTML gives a web page its ___. (a) colours (b) speed (c) structure (d) sound
  22. 22.True or false: in <img>, src shows if the image fails. (a) True (b) False
  23. 23.Which of these is an empty tag? (a) <h1> (b) <title> (c) <input> (d) <li>
  24. 24.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <html> (b) <!DOCTYPE html>
  25. 25.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="100">
  26. 26.True or false: <style> goes in the body. (a) True (b) False
  27. 27.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  28. 28.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  29. 29.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <h2>Good morning!</h2>
    <p>Hello, world!</p>
  30. 30.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  31. 31.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Rain today</p>
    <h3>Cricket is fun.</h3>
    <p>Cricket is fun.</p>
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue<br>Stars shine</p>
  33. 33.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  34. 34.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Rain today</p> -->
  35. 35.True or false: <p> goes in the head. (a) False (b) True
  36. 36.True or false: in <img>, height is read by screen readers. (a) True (b) False
  37. 37.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Language (d) Laptop
  38. 38.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="400">
    (a) An old fort (b) tiger.jpg (c) fort.jpg (d) kite.png
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Fun facts</p> -->
  40. 40.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body

Answer key

  1. 3
  2. in the head
  3. 300
  4. <li>
  5. element
  6. <h1>
  7. <ul>
  8. 6
  9. Take the quiz
  10. a line across the page
  11. 1
  12. about.html
  13. True
  14. height
  15. 350
  16. <h1>
  17. The red kite
  18. My pets
  19. -->
  20. </em>
  21. structure
  22. False
  23. <input>
  24. <!DOCTYPE html>
  25. 100
  26. False
  27. to leave notes
  28. in the body
  29. 4
  30. a web browser
  31. 2
  32. 3
  33. <ol>
  34. 1
  35. False
  36. False
  37. Language
  38. fort.jpg
  39. 2
  40. in the body

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