← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 510 · 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: a web browser sends pages over the net. (a) False (b) True
  2. 2.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) dog.jpg (b) The full moon (c) width (d) A happy dog
  3. 3.True or false: a web server is where we type code. (a) True (b) False
  4. 4.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) href (b) news.html (c) About us (d) Play games
  5. 5.True or false: a code editor shows pages from the web. (a) True (b) False
  6. 6.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>My best friend</h4>
    <p>Good morning!</p>
  7. 7.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
  8. 8.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) <body>
  9. 9.True or false: <title> has a closing tag. (a) True (b) False
  10. 10.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  11. 11.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="400">
    (a) A red kite (b) cake.jpg (c) kite.png (d) map.png
  12. 12.🔗 Where does this link open?
    <a href="games.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="200">
    (a) A tiger asleep (b) width (c) fort.jpg (d) An old fort
  14. 14.🏷️ Which is the closing tag for <u>? (a) <\u> (b) <u> (c) <u/> (d) </u>
  15. 15.True or false: HTML on its own can count button clicks. (a) False (b) True
  16. 16.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
  17. 17.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dollar $ (c) a slash / (d) a dot .
  18. 18.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
  19. 19.Which of these is an empty tag? (a) <p> (b) <b> (c) <h1> (d) <img>
  20. 20.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
  21. 21.True or false: a web server hosts websites online. (a) True (b) False
  22. 22.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
  23. 23.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    <p>Cricket is fun.</p>
    (a) I love mangoes. (b) My pets (c) Cricket is fun.
  24. 24.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  25. 25.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
  26. 26.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) dog.jpg (b) moon.png (c) bus.jpg (d) A happy dog
  27. 27.🔍 Which is the odd one out? (a) saves our .html files (b) turns HTML into a page (c) opens web pages for us (d) shows pages from the web
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
  29. 29.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) is where we type code (d) hosts websites online
  30. 30.Which of these is an opening tag? (a) </p> (b) <li> (c) </li> (d) </title>
  31. 31.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h4>? (a) <h2> (b) <h1> (c) <h3> (d) <h4>
  32. 32.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  33. 33.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>The red kite</p>
    <p>My pets</p>
  34. 34.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  35. 35.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    <p>Hello, world!</p>
    (a) Cricket is fun. (b) My pets (c) My best friend (d) Hello, world!
  36. 36.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Rivers flow</p>
  37. 37.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) index.html (c) My Hobbies (d) Easy snacks
  38. 38.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Fun facts</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>I love mangoes.</p> -->
  39. 39.🔍 One closing tag is missing. Which one?
    <em>Hello, world!
    <u>Fun facts</u>
    <h2>The red kite</h2>
    (a) </em> (b) </h2> (c) </strong> (d) </u>
  40. 40.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag

Answer key

  1. False
  2. A happy dog
  3. False
  4. Play games
  5. False
  6. 2
  7. 1
  8. <!DOCTYPE html>
  9. True
  10. Yes
  11. kite.png
  12. in the same tab
  13. An old fort
  14. </u>
  15. False
  16. src
  17. a slash /
  18. <img>
  19. <img>
  20. a web browser
  21. True
  22. 2
  23. I love mangoes.
  24. in the body
  25. 3
  26. dog.jpg
  27. saves our .html files
  28. 1
  29. is where we type code
  30. <li>
  31. <h4>
  32. has a closing tag
  33. 3
  34. No
  35. Cricket is fun.
  36. 2
  37. My Hobbies
  38. 1
  39. </em>
  40. an opening tag

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