← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 234 · 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.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  2. 2.Which of these is a closing tag? (a) <p> (b) <li> (c) <body> (d) </li>
  3. 3.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  4. 4.🔍 Which line is missing its closing tag?
    line 1: <u>My pets</u>
    line 2: <strong>Rain today</strong>
    line 3: <h1>My best friend
    (a) line 2 (b) line 1 (c) line 3
  5. 5.True or false: a code editor shows line numbers. (a) True (b) False
  6. 6.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="50">
  7. 7.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  8. 8.True or false: in <img>, alt describes the picture. (a) True (b) False
  9. 9.True or false: <style> goes in the body. (a) True (b) False
  10. 10.🔗 Which address opens when you click this link?
    <a href="about.html">School news</a>
    (a) School news (b) about.html (c) contact.html (d) https://example.com
  11. 11.Which of these is true of a code editor? (a) hosts websites online (b) turns HTML into a page (c) opens web pages for us (d) is where we type code
  12. 12.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <h2>Hello, world!</h2>
    <p>Good morning!</p>
    <p>Good morning!</p>
  13. 13.📝 What does <p> make? (a) a table (b) a link (c) a picture (d) a paragraph
  14. 14.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Home Text (c) Hot Tags (d) HyperText
  15. 15.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h6>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>
  16. 16.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h5>? (a) <h4> (b) <h5> (c) <h1> (d) <h6>
  17. 17.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <a href="about.html">
  18. 18.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h5> or <h6>? (a) <h1> (b) <h6> (c) <h5> (d) <h2>
  19. 19.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
  20. 20.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  21. 21.True or false: <img> is an empty tag. (a) False (b) True
  22. 22.📋 What number does the browser show next to “Grapes”?
    <ol start="7">
      <li>Orange</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
  23. 23.📋 What number does the browser show next to “Litchi”?
    <ol>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  24. 24.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
  25. 25.🔍 Which line is missing its closing tag?
    line 1: <b>My best friend</b>
    line 2: <h2>I love mangoes.
    line 3: <p>Fun facts</p>
    (a) line 3 (b) line 1 (c) line 2
  26. 26.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
  27. 27.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) tiger.jpg (b) A tiger asleep (c) kite.png (d) map.png
  28. 28.True or false: in <img>, src names the picture file. (a) False (b) True
  29. 29.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <p>Fun facts</p>
  31. 31.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="300">
  32. 32.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
  34. 34.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  35. 35.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing<br>Kites fly high</p>
  37. 37.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
  38. 38.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ul>
  39. 39.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
  40. 40.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body

Answer key

  1. an opening tag
  2. </li>
  3. numbers
  4. line 3
  5. True
  6. 50
  7. <ol>
  8. True
  9. False
  10. about.html
  11. is where we type code
  12. 4
  13. a paragraph
  14. HyperText
  15. <h6>
  16. <h1>
  17. <a href="about.html">
  18. <h6>
  19. 1
  20. No
  21. True
  22. 8
  23. 2
  24. alt
  25. line 2
  26. 2
  27. tiger.jpg
  28. True
  29. <ol>
  30. 2
  31. 300
  32. Yes
  33. 1
  34. a closing tag
  35. Yes
  36. 3
  37. <h1>
  38. 5
  39. 3
  40. in the head

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