← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 612 · 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 many headings are in this code?
    <h1>My pets</h1>
    <p>My pets</p>
    <h2>I love mangoes.</h2>
    <p>Our school trip</p>
    <h2>My best friend</h2>
  2. 2.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
  3. 3.True or false: <ol> lists steps in order. (a) True (b) False
  4. 4.🔠 Are headings shown in bold by default? (a) Yes (b) No
  5. 5.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  6. 6.Which of these is an empty tag? (a) <li> (b) <h1> (c) <p> (d) <img>
  7. 7.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  8. 8.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
  9. 9.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
  10. 10.🔗 Where does this link open?
    <a href="art.html">Play games</a>
    (a) in a new tab (b) in the same tab
  11. 11.🔗 Which address opens when you click this link?
    <a href="maths.html">School news</a>
    (a) art.html (b) School news (c) news.html (d) maths.html
  12. 12.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <style> (d) <ul>
  13. 13.True or false: HTML on its own can add pictures to a page. (a) True (b) False
  14. 14.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="50">
    (a) map.png (b) dog.jpg (c) cake.jpg (d) Map of India
  15. 15.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
  16. 16.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h1> or <h5>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
  17. 17.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  18. 18.🔗 Which words do you click on?
    <a href="about.html">Art corner</a>
    (a) href (b) about.html (c) Art corner (d) School news
  19. 19.🔗 Which address opens when you click this link?
    <a href="games.html">Visit the site</a>
    (a) about.html (b) games.html (c) Visit the site (d) contact.html
  20. 20.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  21. 21.💬 Does the browser show comments on the page? (a) No (b) Yes
  22. 22.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
  23. 23.Which of these is true of a web browser? (a) opens web pages for us (b) shows line numbers (c) is where we type code (d) sends pages over the net
  24. 24.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </head> (c) <html> (d) <!DOCTYPE html>
  25. 25.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
  26. 26.💬 How does an HTML comment start? (a) // (b) /* (c) <!-- (d) #
  27. 27.Which of these is true of a web browser? (a) turns HTML into a page (b) shows line numbers (c) answers page requests (d) is where we type code
  28. 28.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
  29. 29.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) a comment (d) an element name
  30. 30.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  32. 32.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 6 (d) 10
  33. 33.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
    (a) numbers (b) bullets
  34. 34.Which of these is true of a code editor? (a) sends pages over the net (b) hosts websites online (c) opens web pages for us (d) is where we type code
  35. 35.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) Birthday cake (b) A happy dog (c) cake.jpg (d) width
  36. 36.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  37. 37.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <p> (c) <br> (d) <h1>
  38. 38.True or false: <title> is an empty tag. (a) True (b) False
  39. 39.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  40. 40.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <a src="about.html"> (d) <link about.html>

Answer key

  1. 3
  2. 1
  3. True
  4. Yes
  5. No
  6. <img>
  7. a closing tag
  8. a web browser
  9. 3
  10. in the same tab
  11. maths.html
  12. <ul>
  13. True
  14. map.png
  15. height
  16. <h1>
  17. 2
  18. Art corner
  19. games.html
  20. No
  21. No
  22. <a>
  23. opens web pages for us
  24. </html>
  25. <h1>
  26. <!--
  27. turns HTML into a page
  28. a web server
  29. an attribute
  30. an opening tag
  31. numbers
  32. 1
  33. numbers
  34. is where we type code
  35. Birthday cake
  36. 3
  37. <h1>
  38. False
  39. <ol>
  40. <a href="about.html">

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