← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 962 · 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.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  2. 2.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <a> (d) <p>
  3. 3.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  4. 4.True or false: a code editor shows line numbers. (a) False (b) True
  5. 5.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h5>? (a) <h1> (b) <h2> (c) <h5> (d) <h4>
  6. 6.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  7. 7.🔗 Which words do you click on?
    <a href="quiz.html">Maths fun</a>
    (a) Art corner (b) quiz.html (c) href (d) Maths fun
  8. 8.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  9. 9.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) map.png (b) kite.png (c) A red kite (d) cake.jpg
  10. 10.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) </h2> (c) <h2/> (d) <\h2>
  11. 11.📄 Can HTML on its own make headings? (a) Yes (b) No
  12. 12.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
    <p>Our school trip</p>
  14. 14.True or false: a code editor stores a website’s files. (a) True (b) False
  15. 15.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h6>? (a) <h4> (b) <h3> (c) <h5> (d) <h6>
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <u>I love mangoes.
    line 2: <h2>The red kite</h2>
    line 3: <h1>My best friend</h1>
    (a) line 3 (b) line 2 (c) line 1
  17. 17.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
  18. 18.True or false: <li> has a closing tag. (a) True (b) False
  19. 19.🔍 Which is the odd one out? (a) stores a website’s files (b) colours code to help us (c) hosts websites online (d) sends pages over the net
  20. 20.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) tiger.jpg (b) An old fort (c) kite.png (d) fort.jpg
  21. 21.Which of these has a closing tag? (a) <h1> (b) <input> (c) <meta> (d) <br>
  22. 22.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
  23. 23.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h1>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
  25. 25.Which of these goes in the head? (a) <img> (b) <ul> (c) <h1> (d) <style>
  26. 26.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) height (c) src (d) width
  27. 27.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
  28. 28.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    <p>Rain today</p>
    (a) Rain today (b) Cricket is fun. (c) Good morning!
  29. 29.💬 How does an HTML comment end? (a) >> (b) */ (c) // (d) -->
  30. 30.🔗 Which address opens when you click this link?
    <a href="news.html">Take the quiz</a>
    (a) Take the quiz (b) games.html (c) news.html (d) quiz.html
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow<br>Sky is blue<br>Roses are red</p>
  32. 32.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  33. 33.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
  34. 34.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
  35. 35.🔍 One closing tag is missing. Which one?
    <h1>Our school trip</h1>
    <strong>Rain today
    <u>Cricket is fun.</u>
    (a) </strong> (b) </h1> (c) </u> (d) </h3>
  36. 36.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
  37. 37.📋 What number does the browser show next to “Guava”?
    <ol start="4">
      <li>Banana</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  38. 38.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    (a) My best friend (b) Our school trip (c) My pets (d) Fun facts
  39. 39.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
  40. 40.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->

Answer key

  1. in the body
  2. <img>
  3. <ul>
  4. True
  5. <h1>
  6. in the body
  7. Maths fun
  8. False
  9. kite.png
  10. </h2>
  11. Yes
  12. has a closing tag
  13. 2
  14. False
  15. <h6>
  16. line 1
  17. 4
  18. True
  19. colours code to help us
  20. fort.jpg
  21. <h1>
  22. False
  23. a closing tag
  24. <h1>
  25. <style>
  26. width
  27. <a href="about.html">
  28. Cricket is fun.
  29. -->
  30. news.html
  31. 4
  32. <ol>
  33. a slash /
  34. a web server
  35. </strong>
  36. <ul>
  37. 5
  38. Fun facts
  39. <!--
  40. 2

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