← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 537 · 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.True or false: <title> goes in the head. (a) True (b) False
  2. 2.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
  3. 3.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
  4. 4.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Our school trip (c) Good morning!
  5. 5.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h1> or <h6>? (a) <h6> (b) <h5> (c) <h1> (d) <h2>
  6. 6.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) <!DOCTYPE html> (c) <head> (d) <body>
  7. 7.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
    (a) bullets (b) numbers
  8. 8.True or false: <ol> is an unordered list. (a) False (b) True
  9. 9.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h5>? (a) <h3> (b) <h1> (c) <h6> (d) <h5>
  10. 10.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  11. 11.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
    (a) I love mangoes. (b) Rain today (c) Our school trip
  12. 12.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  13. 13.True or false: HTML on its own can count button clicks. (a) True (b) False
  14. 14.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) </h1> (d) <h1/>
  15. 15.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em> (c) </em> (d) <em/>
  16. 16.True or false: <img> has a closing tag. (a) False (b) True
  17. 17.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) href (b) About us (c) games.html (d) Contact us
  18. 18.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
  19. 19.🔗 Which address opens when you click this link?
    <a href="quiz.html">Contact us</a>
    (a) quiz.html (b) Contact us (c) games.html (d) about.html
  20. 20.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h6> or <h4>? (a) <h4> (b) <h3> (c) <h6> (d) <h5>
  21. 21.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="200">
    (a) kite.png (b) A red kite (c) cake.jpg (d) map.png
  22. 22.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 3 (d) 10
  23. 23.🔍 Which line is missing its closing tag?
    line 1: <strong>My best friend</strong>
    line 2: <h1>Fun facts
    line 3: <small>Hello, world!</small>
    (a) line 2 (b) line 1 (c) line 3
  24. 24.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <ul> (d) <li>
  25. 25.True or false: <table> goes in the body. (a) True (b) False
  26. 26.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <p>Fun facts</p>
  27. 27.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) alt (d) width
  28. 28.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h5>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
  29. 29.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Our school trip</h2>
    <h2>Hello, world!</h2>
    <h2>The red kite</h2>
  30. 30.True or false: in <img>, height tells which image to load. (a) True (b) False
  31. 31.🔗 Which words do you click on?
    <a href="contact.html">Art corner</a>
    (a) Art corner (b) School news (c) href (d) contact.html
  32. 32.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) My drawings (b) Try this poha. (c) index.html (d) My Hobbies
  33. 33.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h6> or <h5>? (a) <h3> (b) <h6> (c) <h1> (d) <h5>
  34. 34.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  35. 35.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
  36. 36.🔗 Which address opens when you click this link?
    <a href="art.html">About us</a>
    (a) art.html (b) quiz.html (c) About us (d) news.html
  37. 37.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) body (c) Space Facts (d) Welcome!
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <small>Fun facts</small>
    line 2: <h3>Cricket is fun.</h3>
    line 3: <em>Hello, world!
    (a) line 2 (b) line 3 (c) line 1
  39. 39.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the body (d) the head
  40. 40.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a alt="about.html">

Answer key

  1. True
  2. <ul>
  3. href
  4. Our school trip
  5. <h1>
  6. <!DOCTYPE html>
  7. bullets
  8. False
  9. <h6>
  10. bullets
  11. Our school trip
  12. Yes
  13. False
  14. </h1>
  15. </em>
  16. False
  17. About us
  18. <h4>
  19. quiz.html
  20. <h3>
  21. kite.png
  22. 1
  23. line 2
  24. <li>
  25. True
  26. 3
  27. alt
  28. <h6>
  29. 1
  30. False
  31. Art corner
  32. My Hobbies
  33. <h6>
  34. numbers
  35. <!--
  36. art.html
  37. Welcome!
  38. line 3
  39. the body
  40. <a href="about.html">

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