← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 328 · 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.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) art.html (b) maths.html (c) news.html (d) Take the quiz
  3. 3.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
  4. 4.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
  5. 5.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <ul> (d) <link rel="stylesheet">
  6. 6.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  7. 7.True or false: <ol> lists steps in order. (a) False (b) True
  8. 8.Which of these goes in the head? (a) <h1> (b) <title> (c) <table> (d) <p>
  9. 9.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  10. 10.True or false: <li> is an empty tag. (a) False (b) True
  11. 11.🔍 Which is the odd one out? (a) is where we type code (b) shows pages from the web (c) has an address bar (d) opens web pages for us
  12. 12.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Birds sing<br>Stars shine<br>Sky is blue</p>
  13. 13.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
  14. 14.Which of these is true of a code editor? (a) saves our .html files (b) turns HTML into a page (c) stores a website’s files (d) shows pages from the web
  15. 15.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Stars shine<br>Roses are red<br>Sky is blue</p>
  16. 16.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  17. 17.🔍 One closing tag is missing. Which one?
    <small>My pets
    <em>Fun facts</em>
    <i>I love mangoes.</i>
    (a) </i> (b) </em> (c) </strong> (d) </small>
  18. 18.🔗 Where does this link open?
    <a href="news.html">Art corner</a>
    (a) in a new tab (b) in the same tab
  19. 19.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h3>The red kite</h3>
    <h3>Rain today</h3>
    <h3>Rain today</h3>
    <h3>Cricket is fun.</h3>
  20. 20.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) Art corner (b) School news (c) href (d) maths.html
  21. 21.True or false: <li> is an unordered list. (a) True (b) False
  22. 22.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h6> or <h4>? (a) <h3> (b) <h5> (c) <h4> (d) <h6>
  23. 23.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  24. 24.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ul>
    (a) numbers (b) bullets
  25. 25.🔍 One closing tag is missing. Which one?
    <em>Fun facts</em>
    <strong>I love mangoes.
    <h3>The red kite</h3>
    (a) </i> (b) </h3> (c) </em> (d) </strong>
  26. 26.🔗 Which words do you click on?
    <a href="news.html">Contact us</a>
    (a) Visit the site (b) Contact us (c) news.html (d) href
  27. 27.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Easy snacks (b) Try this poha. (c) body (d) Class 7 Blog
  28. 28.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
  29. 29.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
  30. 30.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
  31. 31.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h3>? (a) <h4> (b) <h2> (c) <h3> (d) <h1>
  32. 32.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) moon.png (b) dog.jpg (c) A happy dog (d) bus.jpg
  33. 33.🔍 One closing tag is missing. Which one?
    <i>Good morning!
    <small>Hello, world!</small>
    <u>My pets</u>
    (a) </u> (b) </i> (c) </small> (d) </strong>
  34. 34.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    (a) I love mangoes. (b) Good morning! (c) Fun facts (d) Hello, world!
  35. 35.🔍 Which is the odd one out? (a) turns HTML into a page (b) has an address bar (c) shows pages from the web (d) colours code to help us
  36. 36.🔍 Which line is missing its closing tag?
    line 1: <h1>Fun facts
    line 2: <b>Hello, world!</b>
    line 3: <u>My pets</u>
    (a) line 2 (b) line 1 (c) line 3
  37. 37.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
  38. 38.True or false: <p> goes in the head. (a) False (b) True
  39. 39.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <p>Hello, world!</p>
    (a) Cricket is fun. (b) Our school trip (c) My pets (d) Hello, world!
  40. 40.True or false: <title> goes in the head. (a) True (b) False

Answer key

  1. </h2>
  2. maths.html
  3. <ol>
  4. a code editor
  5. <ul>
  6. has a closing tag
  7. True
  8. <title>
  9. in the body
  10. False
  11. is where we type code
  12. 4
  13. a web server
  14. saves our .html files
  15. 4
  16. an empty tag
  17. </small>
  18. in the same tab
  19. 5
  20. Art corner
  21. False
  22. <h6>
  23. has a closing tag
  24. bullets
  25. </strong>
  26. Contact us
  27. Easy snacks
  28. <a>
  29. <!DOCTYPE html>
  30. an attribute
  31. <h4>
  32. dog.jpg
  33. </i>
  34. Good morning!
  35. colours code to help us
  36. line 1
  37. a slash /
  38. False
  39. My pets
  40. True

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