← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 836 · 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 end? (a) >> (b) */ (c) // (d) -->
  2. 2.🔗 Which address opens when you click this link?
    <a href="news.html">Take the quiz</a>
    (a) quiz.html (b) games.html (c) Take the quiz (d) news.html
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Good morning!</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
  4. 4.True or false: <h1> goes in the head. (a) True (b) False
  5. 5.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>Hello, world!</p>
  6. 6.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    (a) Rain today (b) Our school trip (c) Hello, world! (d) My pets
  7. 7.🔗 Which address opens when you click this link?
    <a href="about.html">Take the quiz</a>
    (a) about.html (b) contact.html (c) Take the quiz (d) https://example.com
  8. 8.🔤 In “HTML”, what does the L stand for? (a) Language (b) Link (c) Laptop (d) Line
  9. 9.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Good morning!</p>
    <p>Our school trip</p>
    <h4>Fun facts</h4>
  10. 10.True or false: HTML on its own cannot run a game loop. (a) False (b) True
  11. 11.Which of these is a closing tag? (a) <body> (b) <h1> (c) <title> (d) </h1>
  12. 12.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  13. 13.True or false: in <img>, width sets how wide it is. (a) True (b) False
  14. 14.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h5> or <h3>? (a) <h5> (b) <h2> (c) <h3> (d) <h4>
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="350">
    (a) A red kite (b) Map of India (c) width (d) kite.png
  16. 16.Which of these goes in the body? (a) <title> (b) <ul> (c) <meta charset="utf-8"> (d) <style>
  17. 17.Which of these has a closing tag? (a) <li> (b) <br> (c) <input> (d) <meta>
  18. 18.📋 Which list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
  19. 19.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h2> or <h5>? (a) <h6> (b) <h4> (c) <h2> (d) <h5>
  20. 20.🏷️ Which is the closing tag for <em>? (a) </em> (b) <em/> (c) <em> (d) <\em>
  21. 21.🔍 Which is the odd one out? (a) sends pages over the net (b) turns HTML into a page (c) opens web pages for us (d) has an address bar
  22. 22.True or false: HTML on its own can make a form. (a) False (b) True
  23. 23.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ul>
    (a) numbers (b) bullets
  24. 24.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
  25. 25.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>Fun facts</p>
  26. 26.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    (a) Cricket is fun. (b) I love mangoes. (c) Good morning! (d) The red kite
  27. 27.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  28. 28.True or false: in <img>, src sets how wide it is. (a) True (b) False
  29. 29.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="300">
  30. 30.True or false: in <img>, src names the picture file. (a) True (b) False
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Kites fly high</p>
  32. 32.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
  34. 34.True or false: HTML on its own can keep a high score. (a) True (b) False
  35. 35.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
  36. 36.Which of these is true of a web server? (a) shows pages from the web (b) opens web pages for us (c) hosts websites online (d) shows line numbers
  37. 37.True or false: HTML on its own can show paragraphs. (a) False (b) True
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) A tiger asleep (b) width (c) fort.jpg (d) An old fort
  39. 39.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  40. 40.Which of these has a closing tag? (a) <title> (b) <br> (c) <input> (d) <img>

Answer key

  1. -->
  2. news.html
  3. 3
  4. False
  5. 4
  6. Hello, world!
  7. about.html
  8. Language
  9. 2
  10. True
  11. </h1>
  12. 6
  13. True
  14. <h5>
  15. A red kite
  16. <ul>
  17. <li>
  18. <li>
  19. <h6>
  20. </em>
  21. sends pages over the net
  22. True
  23. bullets
  24. a slash /
  25. 4
  26. The red kite
  27. has a closing tag
  28. False
  29. 300
  30. True
  31. 3
  32. <!DOCTYPE html>
  33. 2
  34. False
  35. <!--
  36. hosts websites online
  37. True
  38. An old fort
  39. Yes
  40. <title>

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