← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 678 · 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 does an HTML comment start? (a) // (b) /* (c) # (d) <!--
  2. 2.True or false: HTML on its own can add pictures to a page. (a) True (b) False
  3. 3.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="250">
    (a) A happy dog (b) moon.png (c) bus.jpg (d) dog.jpg
  4. 4.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
    (a) My best friend (b) Our school trip (c) Cricket is fun.
  5. 5.🔠 Are headings shown in bold by default? (a) No (b) Yes
  6. 6.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
  7. 7.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) about.html (b) About us (c) href (d) Contact us
  8. 8.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) </body> (b) <body>
  9. 9.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="250">
    (a) kite.png (b) An old fort (c) fort.jpg (d) tiger.jpg
  10. 10.🔗 Where does this link open?
    <a href="games.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  11. 11.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  12. 12.🔗 Which words do you click on?
    <a href="news.html">About us</a>
    (a) Contact us (b) About us (c) href (d) news.html
  13. 13.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Riya’s Recipes (c) Match report (d) Thanks for visiting.
  14. 14.📋 Which list suits a shopping list in any order? (a) <ol> (b) <br> (c) <hr> (d) <ul>
  15. 15.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
  16. 16.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  17. 17.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h3>? (a) <h1> (b) <h2> (c) <h3> (d) <h5>
  18. 18.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    (a) Cricket is fun. (b) My best friend (c) My pets
  19. 19.🔍 Which is the odd one out? (a) answers page requests (b) saves our .html files (c) sends pages over the net (d) hosts websites online
  20. 20.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  21. 21.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h3>Cricket is fun.</h3>
    <h4>I love mangoes.</h4>
    <h4>Our school trip</h4>
  22. 22.📋 Does this list show bullets or numbers?
    <ul>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  23. 23.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) moon.png (b) bus.jpg (c) dog.jpg (d) A happy dog
  24. 24.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) Class 7 Blog (c) My drawings (d) body
  25. 25.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
  26. 26.True or false: <ol> is an ordered list. (a) True (b) False
  27. 27.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>I love mangoes.</h2>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <p>Fun facts</p>
  28. 28.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Our school trip</p>
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <p>Good morning!</p>
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
  30. 30.Which of these is true of a code editor? (a) turns HTML into a page (b) is where we type code (c) sends pages over the net (d) answers page requests
  31. 31.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Guava</li>
    </ul>
  32. 32.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Welcome! (b) index.html (c) My Hobbies (d) I like to read.
  33. 33.🔗 Which words do you click on?
    <a href="games.html">Maths fun</a>
    (a) Art corner (b) Maths fun (c) href (d) games.html
  34. 34.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) </h2> (c) <h2/> (d) <h2>
  35. 35.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) about.html (b) href (c) Visit the site (d) Maths fun
  36. 36.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>My best friend</h2>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <p>My pets</p>
  37. 37.Which of these is true of a web browser? (a) saves our .html files (b) stores a website’s files (c) shows pages from the web (d) shows line numbers
  38. 38.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) width (b) A happy dog (c) dog.jpg (d) The full moon
  40. 40.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h2>? (a) <h4> (b) <h2> (c) <h1> (d) <h5>

Answer key

  1. <!--
  2. True
  3. dog.jpg
  4. My best friend
  5. Yes
  6. 1
  7. About us
  8. <body>
  9. fort.jpg
  10. in the same tab
  11. has a closing tag
  12. About us
  13. Riya’s Recipes
  14. <ul>
  15. 2
  16. in the head
  17. <h5>
  18. My pets
  19. saves our .html files
  20. No
  21. 4
  22. bullets
  23. dog.jpg
  24. My drawings
  25. 3
  26. True
  27. 2
  28. 6
  29. 2
  30. is where we type code
  31. 2
  32. My Hobbies
  33. Maths fun
  34. </h2>
  35. Visit the site
  36. 4
  37. shows pages from the web
  38. Yes
  39. A happy dog
  40. <h5>

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