← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 636 · 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.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) <h2/> (d) </h2>
  2. 2.💬 Does the browser show comments on the page? (a) No (b) Yes
  3. 3.True or false: HTML on its own can add pictures to a page. (a) False (b) True
  4. 4.🔗 Which address opens when you click this link?
    <a href="games.html">School news</a>
    (a) games.html (b) School news (c) about.html (d) contact.html
  5. 5.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) A happy dog (b) dog.jpg (c) bus.jpg (d) moon.png
  6. 6.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
  7. 7.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  8. 8.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high</p>
  9. 9.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="400">
    (a) A red kite (b) kite.png (c) cake.jpg (d) map.png
  10. 10.📋 Which list tag is one item of a list? (a) <ul> (b) <ol> (c) <li>
  11. 11.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  12. 12.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
    (a) I love mangoes. (b) Fun facts (c) Good morning!
  13. 13.🖼️ Why do we add alt text to an image? (a) to colour it (b) to make it bigger (c) to load it faster (d) to describe the image
  14. 14.True or false: <p> goes in the head. (a) True (b) False
  15. 15.🏷️ Which is the closing tag for <p>? (a) <p> (b) <p/> (c) <\p> (d) </p>
  16. 16.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
    (a) Hello, world! (b) Good morning! (c) My pets
  17. 17.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  18. 18.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) height (c) src (d) alt
  19. 19.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  20. 20.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Good morning!</p>
    <h4>My best friend</h4>
    <p>I love mangoes.</p>
  21. 21.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
  22. 22.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>Good morning!</h2>
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <p>My pets</p>
  23. 23.🔍 One closing tag is missing. Which one?
    <strong>Hello, world!</strong>
    <u>Cricket is fun.</u>
    <i>The red kite
    (a) </strong> (b) </p> (c) </u> (d) </i>
  24. 24.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  25. 25.True or false: in <img>, src sets how wide it is. (a) True (b) False
  26. 26.True or false: HTML on its own can pick a random number. (a) False (b) True
  27. 27.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
  28. 28.Which of these is an opening tag? (a) </li> (b) <b> (c) </p> (d) </title>
  29. 29.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) body (c) Try this poha. (d) Welcome!
  30. 30.📝 What does <p> make? (a) a table (b) a picture (c) a link (d) a paragraph
  31. 31.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  32. 32.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) width (d) src
  33. 33.Which of these is an empty tag? (a) <p> (b) <li> (c) <br> (d) <h1>
  34. 34.True or false: HTML on its own cannot make links to pages. (a) False (b) True
  35. 35.Which of these goes in the head? (a) <a> (b) <p> (c) <h1> (d) <meta charset="utf-8">
  36. 36.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) tiger.jpg (b) fort.jpg (c) An old fort (d) kite.png
  37. 37.True or false: a web server shows pages from the web. (a) True (b) False
  38. 38.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h2>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
  39. 39.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high<br>Rivers flow<br>Sky is blue<br>Birds sing</p>
  40. 40.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->

Answer key

  1. </h2>
  2. No
  3. True
  4. games.html
  5. dog.jpg
  6. 2
  7. No
  8. 2
  9. kite.png
  10. <li>
  11. Yes
  12. Fun facts
  13. to describe the image
  14. False
  15. </p>
  16. Hello, world!
  17. No
  18. height
  19. in a new tab
  20. 2
  21. <
  22. 4
  23. </i>
  24. in the head
  25. False
  26. False
  27. <!--
  28. <b>
  29. Welcome!
  30. a paragraph
  31. in the body
  32. src
  33. <br>
  34. False
  35. <meta charset="utf-8">
  36. fort.jpg
  37. False
  38. <h1>
  39. 5
  40. 2

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