← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 53 · 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 </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  2. 2.True or false: <ul> lists steps in order. (a) False (b) True
  3. 3.Which of these is true of a code editor? (a) stores a website’s files (b) shows pages from the web (c) turns HTML into a page (d) is where we type code
  4. 4.Which of these is an opening tag? (a) </h1> (b) </body> (c) </p> (d) <h1>
  5. 5.Which of these has a closing tag? (a) <input> (b) <img> (c) <h1> (d) <br>
  6. 6.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <p>My best friend</p>
    (a) My best friend (b) Hello, world! (c) Cricket is fun. (d) Fun facts
  7. 7.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
  8. 8.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
  9. 9.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h6>? (a) <h3> (b) <h4> (c) <h6> (d) <h5>
  10. 10.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h1>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
  11. 11.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  12. 12.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Rain today</p>
    <h2>Good morning!</h2>
    <p>Fun facts</p>
  13. 13.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  14. 14.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="300">
    (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Roses are red</p>
  16. 16.📄 Can HTML on its own make headings? (a) Yes (b) No
  17. 17.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h3>? (a) <h5> (b) <h4> (c) <h3> (d) <h6>
  18. 18.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  19. 19.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  20. 20.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the head (d) the title
  21. 21.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <h3>My pets
    line 2: <p>Hello, world!</p>
    line 3: <h1>Our school trip</h1>
    (a) line 1 (b) line 3 (c) line 2
  23. 23.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h3>? (a) <h2> (b) <h6> (c) <h3> (d) <h5>
  24. 24.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <!DOCTYPE html> (c) </body> (d) <html>
  25. 25.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h3> or <h1>? (a) <h5> (b) <h1> (c) <h6> (d) <h3>
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My pets</p> -->
  27. 27.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i> (c) <i/> (d) </i>
  28. 28.📝 What does <p> make? (a) a table (b) a paragraph (c) a picture (d) a link
  29. 29.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
  30. 30.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
  31. 31.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) games.html (b) School news (c) quiz.html (d) about.html
  32. 32.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) A happy dog (b) moon.png (c) bus.jpg (d) dog.jpg
  33. 33.🔍 One closing tag is missing. Which one?
    <h3>Fun facts</h3>
    <i>Our school trip
    <strong>The red kite</strong>
    (a) </h3> (b) </strong> (c) </h2> (d) </i>
  34. 34.True or false: <a> goes in the body. (a) True (b) False
  35. 35.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Guava</li>
      <li>Banana</li>
    </ul>
    (a) bullets (b) numbers
  36. 36.🔠 Are headings shown in bold by default? (a) No (b) Yes
  37. 37.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) width (c) src (d) height
  38. 38.True or false: <img> has a closing tag. (a) False (b) True
  39. 39.True or false: <li> lists things in any order. (a) True (b) False
  40. 40.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) map.png (b) tiger.jpg (c) kite.png (d) A tiger asleep

Answer key

  1. a closing tag
  2. False
  3. is where we type code
  4. <h1>
  5. <h1>
  6. Hello, world!
  7. an attribute
  8. 1
  9. <h6>
  10. <h1>
  11. <ol>
  12. 2
  13. No
  14. map.png
  15. 2
  16. Yes
  17. <h3>
  18. Yes
  19. in the head
  20. the body
  21. a closing tag
  22. line 1
  23. <h2>
  24. <!DOCTYPE html>
  25. <h6>
  26. 1
  27. </i>
  28. a paragraph
  29. <h1>
  30. 2
  31. quiz.html
  32. dog.jpg
  33. </i>
  34. True
  35. bullets
  36. Yes
  37. alt
  38. False
  39. False
  40. tiger.jpg

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