← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 553 · 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.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  2. 2.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Rain today</p>
    <h3>Good morning!</h3>
    <p>The red kite</p>
    <p>The red kite</p>
  3. 3.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
  4. 4.Which of these is an empty tag? (a) <ul> (b) <img> (c) <p> (d) <h1>
  5. 5.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
  6. 6.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line
  7. 7.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
    (a) My pets (b) The red kite (c) Our school trip
  8. 8.True or false: a code editor sends pages over the net. (a) True (b) False
  9. 9.🔍 Which is the odd one out? (a) shows line numbers (b) turns HTML into a page (c) shows pages from the web (d) has an address bar
  10. 10.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>
  11. 11.True or false: a web server is where we type code. (a) False (b) True
  12. 12.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
  13. 13.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to make it bigger (d) to colour it
  14. 14.🔍 One closing tag is missing. Which one?
    <em>The red kite</em>
    <small>Cricket is fun.</small>
    <i>My pets
    (a) </small> (b) </em> (c) </b> (d) </i>
  15. 15.True or false: HTML on its own can pick a random number. (a) False (b) True
  16. 16.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
  17. 17.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets
  18. 18.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
  19. 19.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
  20. 20.True or false: <ol> lists things in any order. (a) True (b) False
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) A tiger asleep (b) fort.jpg (c) width (d) An old fort
  22. 22.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h3>Good morning!</h3>
    <h4>Rain today</h4>
    <p>Hello, world!</p>
    <h2>My pets</h2>
  23. 23.🔍 Which is the odd one out? (a) has an address bar (b) turns HTML into a page (c) colours code to help us (d) shows pages from the web
  24. 24.🔍 One closing tag is missing. Which one?
    <i>My pets</i>
    <u>Fun facts</u>
    <em>Rain today
    (a) </i> (b) </em> (c) </u> (d) </strong>
  25. 25.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
  26. 26.Which of these is true of a web browser? (a) answers page requests (b) opens web pages for us (c) colours code to help us (d) sends pages over the net
  27. 27.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h5>? (a) <h1> (b) <h2> (c) <h6> (d) <h5>
  28. 28.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h3>Good morning!</h3>
    <p>Hello, world!</p>
  29. 29.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
  30. 30.Which of these is a closing tag? (a) <p> (b) <li> (c) </p> (d) <title>
  31. 31.True or false: in <img>, width names the picture file. (a) False (b) True
  32. 32.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
  33. 33.Which of these has a closing tag? (a) <hr> (b) <ul> (c) <meta> (d) <br>
  34. 34.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) about.html (b) href (c) Maths fun (d) Art corner
  35. 35.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h6> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
  36. 36.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>My pets</p>
    <h2>The red kite</h2>
  37. 37.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="250">
  38. 38.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
  39. 39.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h2> or <h5>? (a) <h3> (b) <h6> (c) <h2> (d) <h5>
  40. 40.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) { (d) [

Answer key

  1. No
  2. 2
  3. element
  4. <img>
  5. href
  6. starts a new line
  7. My pets
  8. False
  9. shows line numbers
  10. <ol>
  11. False
  12. 2
  13. to describe the image
  14. </i>
  15. False
  16. <li>
  17. bullets
  18. on the browser tab
  19. a web browser
  20. False
  21. An old fort
  22. 4
  23. colours code to help us
  24. </em>
  25. <h1>
  26. opens web pages for us
  27. <h6>
  28. 2
  29. to leave notes
  30. </p>
  31. False
  32. <!DOCTYPE html>
  33. <ul>
  34. Maths fun
  35. <h6>
  36. 2
  37. 250
  38. <ol>
  39. <h2>
  40. <

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