← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 969 · 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.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  2. 2.Which of these is a closing tag? (a) </h1> (b) <h1> (c) <li> (d) <p>
  3. 3.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
  4. 4.True or false: a web browser colours code to help us. (a) True (b) False
  5. 5.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
  6. 6.Which of these is an opening tag? (a) </h1> (b) <title> (c) </li> (d) </p>
  7. 7.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  8. 8.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine</p>
  9. 9.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h5>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
  10. 10.True or false: <p> goes in the head. (a) False (b) True
  11. 11.Which of these is a closing tag? (a) <title> (b) </li> (c) <body> (d) <li>
  12. 12.💬 Does the browser show comments on the page? (a) Yes (b) No
  13. 13.📋 Which list tag is an ordered list? (a) <ol> (b) <ul> (c) <li>
  14. 14.🔍 One closing tag is missing. Which one?
    <small>My best friend</small>
    <i>Our school trip</i>
    <h1>My pets
    (a) </small> (b) </p> (c) </i> (d) </h1>
  15. 15.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  16. 16.True or false: <ul> goes in the head. (a) False (b) True
  17. 17.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) index.html (b) We won by 5 runs. (c) Easy snacks (d) Class 7 Blog
  18. 18.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  19. 19.🔗 Where does this link open?
    <a href="news.html">About us</a>
    (a) in the same tab (b) in a new tab
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Hello, world! (c) The red kite
  21. 21.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Space Facts (b) Try this poha. (c) body (d) My drawings
  22. 22.🔍 One closing tag is missing. Which one?
    <b>Hello, world!</b>
    <u>My best friend
    <h3>Our school trip</h3>
    (a) </h3> (b) </u> (c) </p> (d) </b>
  23. 23.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h6>? (a) <h6> (b) <h2> (c) <h5> (d) <h4>
  24. 24.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <li> (d) <input>
  25. 25.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>Cricket is fun.</h2>
    <h4>Rain today</h4>
  26. 26.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>I love mangoes.</h2>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <p>My best friend</p>
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high</p>
  28. 28.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>My pets</h2>
    <p>Our school trip</p>
    <h2>My pets</h2>
    <p>Rain today</p>
    <p>I love mangoes.</p>
  29. 29.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h3> or <h5>? (a) <h5> (b) <h2> (c) <h3> (d) <h6>
  30. 30.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  31. 31.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <!-- <p>Fun facts</p> -->
  32. 32.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  33. 33.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Rain today</p>
    <h2>My best friend</h2>
    <h2>Cricket is fun.</h2>
  34. 34.🖼️ Which attribute of <img> describes the picture? (a) alt (b) height (c) width (d) src
  35. 35.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
  37. 37.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
  38. 38.True or false: <meta> is an empty tag. (a) True (b) False
  39. 39.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  40. 40.🔗 Which address opens when you click this link?
    <a href="news.html">Contact us</a>
    (a) news.html (b) quiz.html (c) games.html (d) Contact us

Answer key

  1. in the body
  2. </h1>
  3. <h1>
  4. False
  5. <!DOCTYPE html>
  6. <title>
  7. in the head
  8. 2
  9. <h1>
  10. False
  11. </li>
  12. No
  13. <ol>
  14. </h1>
  15. bullets
  16. False
  17. Class 7 Blog
  18. -->
  19. in the same tab
  20. Hello, world!
  21. My drawings
  22. </u>
  23. <h6>
  24. <input>
  25. 3
  26. 4
  27. 2
  28. 4
  29. <h6>
  30. in the head
  31. 2
  32. Yes
  33. 2
  34. alt
  35. 2
  36. 1
  37. <
  38. True
  39. Yes
  40. news.html

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