← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 772 · 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.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  2. 2.🏷️ Every HTML tag starts with which sign? (a) ( (b) [ (c) { (d) <
  3. 3.🏷️ Which is the closing tag for <i>? (a) </i> (b) <\i> (c) <i> (d) <i/>
  4. 4.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  5. 5.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h5> or <h4>? (a) <h4> (b) <h5> (c) <h6> (d) <h2>
  6. 6.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to make it bigger (d) to load it faster
  7. 7.Which of these has a closing tag? (a) <hr> (b) <li> (c) <img> (d) <meta>
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <i>Rain today</i>
    line 2: <b>The red kite</b>
    line 3: <h1>Fun facts
    (a) line 3 (b) line 1 (c) line 2
  9. 9.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
  10. 10.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  11. 11.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  12. 12.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
  13. 13.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <link about.html>
  14. 14.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
  15. 15.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h4> (d) <h3>
  17. 17.Which of these is an opening tag? (a) </p> (b) </h1> (c) <title> (d) </li>
  18. 18.True or false: in <img>, height shows if the image fails. (a) True (b) False
  19. 19.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) nowhere (d) at the bottom
  20. 20.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  21. 21.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Fun facts</p>
    <p>My pets</p>
  22. 22.🔗 Which words do you click on?
    <a href="contact.html">Play games</a>
    (a) About us (b) Play games (c) contact.html (d) href
  23. 23.🔗 Which attribute holds the address of a link? (a) src (b) href (c) id (d) alt
  24. 24.🔍 One closing tag is missing. Which one?
    <p>Hello, world!</p>
    <em>I love mangoes.</em>
    <i>Cricket is fun.
    (a) </p> (b) </em> (c) </h1> (d) </i>
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red<br>Sky is blue<br>Kites fly high<br>Birds sing</p>
  26. 26.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h2> or <h4>? (a) <h6> (b) <h4> (c) <h5> (d) <h2>
  27. 27.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    <p>Fun facts</p>
    (a) Fun facts (b) Hello, world! (c) My best friend (d) Cricket is fun.
  28. 28.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  29. 29.🔠 Are headings shown in bold by default? (a) Yes (b) No
  30. 30.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) tags (d) pixels
  31. 31.🔗 Which address opens when you click this link?
    <a href="quiz.html">Visit the site</a>
    (a) Visit the site (b) quiz.html (c) about.html (d) games.html
  32. 32.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
  33. 33.🔗 Where does this link open?
    <a href="https://example.com">School news</a>
    (a) in a new tab (b) in the same tab
  34. 34.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
  35. 35.Which of these is true of a web browser? (a) shows pages from the web (b) is where we type code (c) stores a website’s files (d) shows line numbers
  36. 36.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <a> (d) <pic>
  37. 37.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h5> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h5>
  38. 38.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    (a) Good morning! (b) Cricket is fun. (c) Our school trip (d) Fun facts
  39. 39.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
  40. 40.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    (a) I love mangoes. (b) Rain today (c) Fun facts

Answer key

  1. No
  2. <
  3. </i>
  4. a closing tag
  5. <h6>
  6. to describe the image
  7. <li>
  8. line 3
  9. 1
  10. a closing tag
  11. 4
  12. <h1>
  13. <a href="about.html">
  14. <!DOCTYPE html>
  15. an opening tag
  16. <h5>
  17. <title>
  18. False
  19. on the browser tab
  20. No
  21. 1
  22. Play games
  23. href
  24. </i>
  25. 5
  26. <h6>
  27. My best friend
  28. a closing tag
  29. Yes
  30. tags
  31. quiz.html
  32. <a>
  33. in the same tab
  34. <li>
  35. shows pages from the web
  36. <img>
  37. <h1>
  38. Our school trip
  39. <li>
  40. Fun facts

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