← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 908 · 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 address opens when you click this link?
    <a href="games.html">About us</a>
    (a) about.html (b) About us (c) games.html (d) contact.html
  2. 2.Which of these has a closing tag? (a) <img> (b) <br> (c) <ul> (d) <hr>
  3. 3.🔍 One closing tag is missing. Which one?
    <h3>Fun facts
    <p>Our school trip</p>
    <u>I love mangoes.</u>
    (a) </h3> (b) </b> (c) </p> (d) </u>
  4. 4.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Grapes</li>
    </ol>
  5. 5.📋 What number does the browser show next to “Litchi”?
    <ol start="3">
      <li>Mango</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ol>
  6. 6.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h2>
  7. 7.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  8. 8.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h2>? (a) <h2> (b) <h1> (c) <h3> (d) <h5>
  9. 9.Which of these has a closing tag? (a) <meta> (b) <b> (c) <hr> (d) <br>
  10. 10.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
  11. 11.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h2>? (a) <h5> (b) <h2> (c) <h1> (d) <h4>
  12. 12.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
  13. 13.True or false: HTML on its own cannot make tables. (a) True (b) False
  14. 14.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  15. 15.True or false: HTML on its own can add up two numbers. (a) False (b) True
  16. 16.🔍 One closing tag is missing. Which one?
    <h1>I love mangoes.
    <i>The red kite</i>
    <h2>Our school trip</h2>
    (a) </i> (b) </h2> (c) </small> (d) </h1>
  17. 17.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
  18. 18.🔍 One closing tag is missing. Which one?
    <i>The red kite</i>
    <strong>Our school trip
    <em>My pets</em>
    (a) </em> (b) </i> (c) </strong> (d) </h3>
  19. 19.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    (a) Cricket is fun. (b) Our school trip (c) I love mangoes. (d) My best friend
  20. 20.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Rain today</p>
    <p>Good morning!</p>
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="350">
  22. 22.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) </p> (d) <p/>
  23. 23.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as 5 spaces (d) as a new line
  24. 24.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <h2>Hello, world!</h2>
    <p>My pets</p>
  25. 25.🔍 One closing tag is missing. Which one?
    <h3>My best friend
    <i>Hello, world!</i>
    <u>Rain today</u>
    (a) </u> (b) </h3> (c) </strong> (d) </i>
  26. 26.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  27. 27.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
  28. 28.🔗 Which address opens when you click this link?
    <a href="games.html">Visit the site</a>
    (a) about.html (b) contact.html (c) games.html (d) Visit the site
  29. 29.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  30. 30.True or false: in <img>, src tells which image to load. (a) True (b) False
  31. 31.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) </head> (c) <!DOCTYPE html> (d) </body>
  32. 32.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
  33. 33.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>The red kite</p> -->
    <p>Good morning!</p>
    <p>Rain today</p>
  34. 34.📄 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>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) I like to read. (c) Easy snacks (d) Class 7 Blog
  35. 35.📝 What does <br> do? (a) adds a picture (b) makes a list (c) makes text bold (d) starts a new line
  36. 36.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  37. 37.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>My best friend</p> -->
  38. 38.Which of these is an opening tag? (a) </title> (b) </p> (c) <body> (d) </body>
  39. 39.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <p> (d) <h1>
  40. 40.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head

Answer key

  1. games.html
  2. <ul>
  3. </h3>
  4. 6
  5. 4
  6. <h5>
  7. a closing tag
  8. <h5>
  9. <b>
  10. <img>
  11. <h5>
  12. <ul>
  13. False
  14. an opening tag
  15. False
  16. </h1>
  17. <!--
  18. </strong>
  19. I love mangoes.
  20. 1
  21. 350
  22. </p>
  23. as one space
  24. 4
  25. </h3>
  26. <ul>
  27. <ol>
  28. games.html
  29. No
  30. True
  31. <!DOCTYPE html>
  32. <
  33. 2
  34. Class 7 Blog
  35. starts a new line
  36. in the head
  37. 2
  38. <body>
  39. <h6>
  40. in the head

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