← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 204 · 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: HTML on its own can make a form. (a) True (b) False
  2. 2.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  3. 3.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
  4. 4.🔍 One closing tag is missing. Which one?
    <em>Good morning!</em>
    <h2>Rain today</h2>
    <h3>Fun facts
    (a) </em> (b) </b> (c) </h2> (d) </h3>
  5. 5.Which of these is true of a web browser? (a) shows line numbers (b) is where we type code (c) shows pages from the web (d) hosts websites online
  6. 6.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) </h3> (c) <h3/> (d) <\h3>
  7. 7.Which of these is an empty tag? (a) <ul> (b) <title> (c) <hr> (d) <li>
  8. 8.True or false: <ul> is an empty tag. (a) False (b) True
  9. 9.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="200">
  10. 10.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h1>? (a) <h5> (b) <h2> (c) <h1> (d) <h4>
  11. 11.True or false: HTML on its own cannot make a form. (a) True (b) False
  12. 12.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
  13. 13.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </body> (b) </head>
  14. 14.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  15. 15.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to make links (d) to leave notes
  16. 16.🔗 Which address opens when you click this link?
    <a href="https://example.com">Maths fun</a>
    (a) https://example.com (b) maths.html (c) art.html (d) Maths fun
  17. 17.True or false: <ol> is an ordered list. (a) False (b) True
  18. 18.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
  19. 19.💬 How does an HTML comment end? (a) // (b) --> (c) */ (d) >>
  20. 20.🔍 One closing tag is missing. Which one?
    <i>Fun facts
    <u>Cricket is fun.</u>
    <small>The red kite</small>
    (a) </i> (b) </u> (c) </small> (d) </h1>
  21. 21.Which of these goes in the head? (a) <img> (b) <style> (c) <p> (d) <a>
  22. 22.🔗 Where does this link open?
    <a href="news.html">School news</a>
    (a) in a new tab (b) in the same tab
  23. 23.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h3>Rain today</h3>
    <p>Cricket is fun.</p>
    <p>My pets</p>
  24. 24.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) index.html (c) Mars is red. (d) My drawings
  25. 25.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a dollar $ (d) a hash #
  26. 26.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
  27. 27.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
  28. 28.Which of these is true of a code editor? (a) stores a website’s files (b) has an address bar (c) colours code to help us (d) opens web pages for us
  29. 29.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) turns HTML into a page (d) is where we type code
  30. 30.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="400">
    (a) map.png (b) cake.jpg (c) A red kite (d) kite.png
  31. 31.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
    <p>Rain today</p>
    (a) Hello, world! (b) Cricket is fun. (c) Rain today (d) Fun facts
  32. 32.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Link (d) Line
  33. 33.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) games.html (b) Maths fun (c) href (d) Visit the site
  34. 34.Which of these is true of a web server? (a) has an address bar (b) colours code to help us (c) shows line numbers (d) stores a website’s files
  35. 35.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
  36. 36.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
  37. 37.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) news.html (b) Take the quiz (c) art.html (d) maths.html
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="350">
    (a) width (b) Map of India (c) map.png (d) Birthday cake
  39. 39.True or false: in <img>, height is read by screen readers. (a) True (b) False
  40. 40.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body

Answer key

  1. True
  2. Yes
  3. starts a new line
  4. </h3>
  5. shows pages from the web
  6. </h3>
  7. <hr>
  8. False
  9. 200
  10. <h5>
  11. False
  12. <li>
  13. </head>
  14. bullets
  15. to leave notes
  16. https://example.com
  17. True
  18. 1
  19. -->
  20. </i>
  21. <style>
  22. in the same tab
  23. 2
  24. Class 7 Blog
  25. a slash /
  26. <h1>
  27. 1
  28. colours code to help us
  29. is where we type code
  30. kite.png
  31. Hello, world!
  32. Language
  33. Visit the site
  34. stores a website’s files
  35. <ul>
  36. <!DOCTYPE html>
  37. maths.html
  38. Map of India
  39. False
  40. in the head

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