← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 517 · 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.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
  2. 2.True or false: a web server saves our .html files. (a) True (b) False
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="50">
    (a) Birthday cake (b) width (c) Map of India (d) map.png
  4. 4.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  5. 5.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) id (d) href
  6. 6.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 6 (d) 1
  7. 7.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  8. 8.🔗 Which words do you click on?
    <a href="about.html">Contact us</a>
    (a) href (b) Contact us (c) about.html (d) Visit the site
  9. 9.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  10. 10.True or false: HTML on its own can make tables. (a) True (b) False
  11. 11.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ol>
  12. 12.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) My drawings (c) Art Gallery (d) body
  13. 13.True or false: HTML on its own cannot pick a random number. (a) False (b) True
  14. 14.Which of these is a closing tag? (a) </p> (b) <body> (c) <h1> (d) <b>
  15. 15.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
  16. 16.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) body (c) Riya’s Recipes (d) All about me
  17. 17.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  18. 18.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>
  19. 19.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Guava</li>
    </ul>
    (a) numbers (b) bullets
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
    <p>Hello, world!</p>
  21. 21.Which of these is true of a web server? (a) turns HTML into a page (b) hosts websites online (c) colours code to help us (d) saves our .html files
  22. 22.🔗 Which address opens when you click this link?
    <a href="art.html">Art corner</a>
    (a) quiz.html (b) news.html (c) art.html (d) Art corner
  23. 23.Which of these goes in the head? (a) <ul> (b) <p> (c) <table> (d) <meta charset="utf-8">
  24. 24.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h6>? (a) <h6> (b) <h2> (c) <h5> (d) <h3>
  25. 25.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My best friend</p>
    <p>Good morning!</p>
    <h4>Fun facts</h4>
    <p>Our school trip</p>
  26. 26.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Roses are red<br>Birds sing</p>
  27. 27.True or false: in <img>, alt tells which image to load. (a) False (b) True
  28. 28.💬 How does an HTML comment end? (a) >> (b) // (c) */ (d) -->
  29. 29.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>My best friend</p>
    <h3>My best friend</h3>
    <h4>I love mangoes.</h4>
  30. 30.📋 What number does the browser show next to “Guava”?
    <ol start="3">
      <li>Mango</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
  31. 31.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
  32. 32.🔗 Which words do you click on?
    <a href="about.html">School news</a>
    (a) about.html (b) href (c) Take the quiz (d) School news
  33. 33.🔤 In “HTML”, what does the L stand for? (a) Language (b) Laptop (c) Line (d) Link
  34. 34.Which of these is an opening tag? (a) </li> (b) <b> (c) </b> (d) </h1>
  35. 35.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Hello, world!</h2>
    <h2>Cricket is fun.</h2>
  36. 36.🔍 One closing tag is missing. Which one?
    <u>Cricket is fun.</u>
    <h1>Our school trip
    <h2>Good morning!</h2>
    (a) </p> (b) </u> (c) </h2> (d) </h1>
  37. 37.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) Our school bus (b) fort.jpg (c) bus.jpg (d) tiger.jpg
  38. 38.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
  39. 39.📄 Can HTML on its own make headings? (a) No (b) Yes
  40. 40.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>

Answer key

  1. <
  2. False
  3. Map of India
  4. 4
  5. href
  6. 1
  7. Yes
  8. Contact us
  9. bullets
  10. True
  11. 2
  12. My drawings
  13. True
  14. </p>
  15. a code editor
  16. All about me
  17. src
  18. <h1>
  19. bullets
  20. 2
  21. hosts websites online
  22. art.html
  23. <meta charset="utf-8">
  24. <h2>
  25. 2
  26. 4
  27. False
  28. -->
  29. 3
  30. 4
  31. 5
  32. School news
  33. Language
  34. <b>
  35. 1
  36. </h1>
  37. bus.jpg
  38. a paragraph
  39. Yes
  40. 3

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