← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 22 · 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 does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
  2. 2.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h3>Our school trip</h3>
    <p>I love mangoes.</p>
  3. 3.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <body> (d) <head>
  4. 4.🔍 One closing tag is missing. Which one?
    <i>Cricket is fun.
    <small>My best friend</small>
    <strong>Good morning!</strong>
    (a) </strong> (b) </h2> (c) </i> (d) </small>
  5. 5.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 3 (d) 4
  6. 6.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  7. 7.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h2>? (a) <h3> (b) <h5> (c) <h1> (d) <h2>
  8. 8.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) element (d) attribute
  9. 9.True or false: HTML on its own cannot make headings. (a) False (b) True
  10. 10.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a new line (d) as a dot
  11. 11.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) A tiger asleep (b) map.png (c) tiger.jpg (d) kite.png
  12. 12.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
  13. 13.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) href (b) games.html (c) Visit the site (d) Contact us
  14. 14.Which of these is true of a web server? (a) opens web pages for us (b) is where we type code (c) hosts websites online (d) saves our .html files
  15. 15.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h2>My pets</h2>
    <h4>Fun facts</h4>
    <h4>Good morning!</h4>
  16. 16.🔍 One closing tag is missing. Which one?
    <h3>The red kite</h3>
    <small>My best friend</small>
    <p>Rain today
    (a) </h3> (b) </p> (c) </small> (d) </i>
  17. 17.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ul>
    (a) numbers (b) bullets
  18. 18.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  19. 19.True or false: <li> is an ordered list. (a) False (b) True
  20. 20.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  21. 21.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <ul>
  22. 22.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="300">
  23. 23.💬 Does the browser show comments on the page? (a) No (b) Yes
  24. 24.📋 What number does the browser show next to “Guava”?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
  25. 25.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  26. 26.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) </head>
  27. 27.🔗 What does HyperText mean? (a) secret text (b) very big text (c) text in colour (d) text with links
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <h3>I love mangoes.
    line 2: <strong>Our school trip</strong>
    line 3: <h1>The red kite</h1>
    (a) line 3 (b) line 2 (c) line 1
  29. 29.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
  30. 30.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) [ (d) {
  31. 31.True or false: a web browser has an address bar. (a) True (b) False
  32. 32.True or false: HTML on its own can add pictures to a page. (a) True (b) False
  33. 33.True or false: HTML on its own can count button clicks. (a) False (b) True
  34. 34.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h4>? (a) <h6> (b) <h4> (c) <h1> (d) <h3>
  35. 35.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  36. 36.🖼️ Which attribute of <img> names the picture file? (a) src (b) alt (c) height (d) width
  37. 37.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  38. 38.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>Good morning!</h3>
    <p>I love mangoes.</p>
  39. 39.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine<br>Roses are red</p>
  40. 40.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h2> or <h3>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>

Answer key

  1. <!--
  2. 2
  3. <!DOCTYPE html>
  4. </i>
  5. 6
  6. an opening tag
  7. <h1>
  8. element
  9. False
  10. as one space
  11. tiger.jpg
  12. an attribute
  13. Contact us
  14. hosts websites online
  15. 4
  16. </p>
  17. bullets
  18. has a closing tag
  19. False
  20. in the body
  21. <ul>
  22. 300
  23. No
  24. 3
  25. <ul>
  26. <!DOCTYPE html>
  27. text with links
  28. line 1
  29. to leave notes
  30. <
  31. True
  32. True
  33. False
  34. <h1>
  35. Yes
  36. src
  37. a web browser
  38. 2
  39. 3
  40. <h2>

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